Results 1 to 13 of 13

Thread: Solved: Can't get my XLA auto installer to work...

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Contributor
    Joined
    Jun 2007
    Posts
    150
    Location

    Solved: Can't get my XLA auto installer to work...

    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:
     Application.EnableEvents = False
    AddIns.Add(AddInFname).Installed = True
    Application.EnableEvents = True
    Which produces this error:
    Run-time error '1004':
    Unable to get the Add property of the AddIns class
    I've tried EVERYTHING! Using different forms of the file name, using different locations, using ThisworkBook.FullName, none of it works!
    I also tried changing the code a little, to separate the steps:
     Application.EnableEvents = False
    AddIns.Add (AddInFname)
    AddIns(AddInTitle).Installed = True
    Application.EnableEvents = True
    This produces a slightly different error:
    Run-time error '1004':
    Add method of Addins class failed
    I even tried throwing out my code and pasting in the code from the article verbatim: same error, on the same piece of code.

     AddIns.Add(ThisWorkbook.FullName, True) _ 
    .Installed = True
    Please help, I'm pulling my damn hair out.
    Last edited by Bob Phillips; 01-14-2022 at 07:30 AM. Reason: Updated code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •