Excel AddIn - error 1004 
Author Message
 Excel AddIn - error 1004

Hi,
    I wrote some Excel addin and almost everything works fine.
User installs addin (*.xla) in XLStart folder, then runs Excel for the first
time with the addin. Generally there are two ways of running Excel: with
empty sheet (eg.Menu Start) or opening existing sheet (eg.from shell). If
 user runs it with new, empty sheet everything is ok. Problems start when
running Excel (first time with addin) with existing sheet, VBA shows:

    'Error 1004 Method Add from AddIns class failed'

on line from Workbook_Open procedure:

    Application.AddIns.Add ThisWorkbook.FullName

while with empty sheet passes this line.
    It seems to me that when Excel starts from the shell addin is executed
before sheet is opened, whereas started with new sheet addin is executed
after sheet is createda and it causes the problem.
    Does anyone know how to make it works in both cases ?

    Any suggestion will be appreciated.
    regards,
Martin



Sun, 06 Jun 2004 07:06:45 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Selecting Excel ranges with VB; error 1004

2. excel runtime 1004 - visual basic file not found

3. Err 1004: Excel Workbook/Sheet Activate

4. ERROR 1004 HELP!!

5. Activesheet.ShowDataForm--->error 1004

6. PasteSpecial Method of charts causes Run-time error 1004

7. VB run time error 1004 under XP Office

8. 1004 runtime error (MacroOptions in Workbok_Open for Add-In)

9. error 1004 with range selection in XL2000

10. Run-time error '1004'

11. Error 1004 using recommended API code

12. General ODBC Error '1004' problem

 

 
Powered by phpBB® Forum Software