Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following code works
Sub Test1() On Error Resume Next AddIns.Add ( _ "C:\Documents and Settings\neuwirth\My Documents\MyTestAddin.xla") If Err.Number < 0 Then MsgBox Err.Number & " " & Err.Description End If AddIns("Mytestaddin").Installed = True End Sub The following code does NOT work, it breaks with Error 1004 Add method of Addins class failed Sub Test2() On Error Resume Next Dim objExcelApp As Excel.Application Set objExcelApp = New Excel.Application objExcelApp.AddIns.Add _ "C:\Documents and Settings\neuwirth\My Documents\MyTestAddin.xla" If Err.Number < 0 Then MsgBox Err.Number & " " & Err.Description End If objExcelApp.AddIns("Mytestaddin").Installed = True End Sub Since I ultimately want to turn Test2 into a standalone VB application, I need to know why it fails. Is there a way of making it work? When I try to run Test2 from Word (with Excel not running) I get the same error. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
addin for excel installation | Setting up and Configuration of Excel | |||
Problems with AddIn Installation | Excel Programming | |||
AddIn installation problem | Excel Programming | |||
AddIn installation Problems | Excel Programming | |||
AddIn installation Problems | Excel Programming |