RE: VSTO add in failes when added in Excel - Automation Server ...
- From: Flemming <Flemming@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 18 Jan 2007 06:51:05 -0800
Thanks for answer - but this lead to another error:
"<filepath\filename.dll> is not a valid office add-in"
By the way - I'm using VSTO 2005 Visual Basic Project Template: "Excel
Add-In" from the standard ".. Office\2003 add-ins".
I have not created "compiled" office add-ins before - only some VBA for own
use. Normally I develop n-tier web-solutions so I'm quite familiar with dll's
Here is the code - actually there is only added a public function to the
template:
It is then installed on the same PC using the template setup program and
then added with the COM Add-in tool inside Excel
--------------
public class ThisAddIn
Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Startup
' Start of VSTO generated code
Me.Application =
CType(Microsoft.Office.Tools.Excel.ExcelLocale1033Proxy.Wrap(GetType(Excel.Application), Me.Application), Excel.Application)
' End of VSTO generated code
End Sub
Private Sub ThisAddIn_Shutdown(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Shutdown
End Sub
Public Function strHelloWorld() As String
Return "hello World 18/1/2007 15:11"
End Function
End class
--------------
--
Wagner Engineering - Solutions 2 make better administration
"XL-Dennis" wrote:
Hi,.
You didn't explicit state if You use VB.NET and Shared add-in or VSTO 2005
SE. However, it looks like You're using the later.
An Automation add-in (that is an add-in with user defined function(s)) is
not per se available via the Excel Add-in dialogform and therefore when You
select it via the "Automation..."-button You get that message.
It's available via the COM Add-ins dialogform but You need to make it
available before getting access to it.
1. Choose the command View | Toolbars | Customize...
2. Choose the Command tab in the dialog
3. In the list of Categories You choose Tools
4. In the list of Commands You scroll down to COM Add-ins...
5. Drag it to the Tools menu and place it under Macro
6. Close the dialog and
7. Select Tools | COM Add-ins...
---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/
- Follow-Ups:
- Prev by Date: Re: Slow Excel Start Up After Installing Add-In
- Next by Date: Re: CommandBarButton click event does not fire
- Previous by thread: change the title property
- Next by thread: RE: VSTO add in failes when added in Excel - Automation Server ...
- Index(es):