LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Addin installation

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
addin for excel installation Kardock Setting up and Configuration of Excel 0 February 13th 09 07:44 PM
Problems with AddIn Installation Stephen Bullen[_3_] Excel Programming 0 June 24th 04 01:07 AM
AddIn installation problem ale036 Excel Programming 0 June 22nd 04 08:58 PM
AddIn installation Problems ale036 Excel Programming 0 June 22nd 04 07:37 PM
AddIn installation Problems cescobar Excel Programming 0 June 22nd 04 07:36 PM


All times are GMT +1. The time now is 11:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"