This is driving me nuts...
I'm trying to set up an auto-installer for my XLA file. I'm basing it on the code listed in this article:
vbaexpress.com/forum/showthread.php?t=10855
Its two pieces, a data workbook as XLS and a macro workbook as XLA. I'll be distributing it as an XLS, so built into the workbook open event is a check for file extension... it is .XLS, it runs the AddInInstaller() sub.
Here is the relevant code:Which produces this error:Application.EnableEvents = False AddIns.Add(AddInFname).Installed = True Application.EnableEvents = TrueI've tried EVERYTHING! Using different forms of the file name, using different locations, using ThisworkBook.FullName, none of it works!Run-time error '1004': Unable to get the Add property of the AddIns class
I also tried changing the code a little, to separate the steps:This produces a slightly different error:Application.EnableEvents = False AddIns.Add (AddInFname) AddIns(AddInTitle).Installed = True Application.EnableEvents = True
I even tried throwing out my code and pasting in the code from the article verbatim: same error, on the same piece of code.Run-time error '1004': Add method of Addins class failed
Please help, I'm pulling my damn hair out.AddIns.Add(ThisWorkbook.FullName, True) _ .Installed = True





