Consulting

Results 1 to 2 of 2

Thread: Solved: set reference to addin using code

  1. #1
    VBAX Regular
    Joined
    Feb 2008
    Location
    atlanta
    Posts
    20
    Location

    Question Solved: set reference to addin using code

    can an addin be referenced using code? i want to be able to do this for the user when i install the addin. thanks.

  2. #2
    VBAX Contributor
    Joined
    Aug 2006
    Location
    Hampshire, UK
    Posts
    140
    Location
    Hi

    Something like this:

     Private Sub Workbook_Open()
       AddIns("Solver Add-In").Installed = True
       On Error Resume Next
       Application.VBE.ActiveVBProject.References.AddFromFile (Application.LibraryPath & "\solver\solver.xla")
    End Sub
    Richard

Posting Permissions

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