+ Reply to Thread
Results 1 to 6 of 6

Auto Install Addin Add-In ?

Hybrid View

koticphreak Auto Install Addin Add-In ? 09-14-2008, 07:05 PM
shg You can have them copy the... 09-14-2008, 07:36 PM
koticphreak Not quite sure I understand... 09-14-2008, 07:55 PM
shg No; that's why I put in in... 09-14-2008, 07:57 PM
koticphreak any hint as to where I can... 09-14-2008, 08:00 PM
shg I thought the guy that wrote... 09-14-2008, 08:44 PM
  1. #1
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120

    Auto Install Addin Add-In ?

    I've written an add-in and I want to distribute it to the office. Is there an easy way to have an installer place it in the "C:\Documents and Settings\CURRENTUSER\Application Data\Microsoft\AddIns" folder? I can see telling them all to copy it there being a pain (or for them to even figure out what their currentuser folder actually is...

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    You can have them copy the add-in and the 'installer' to a local folder, and them have them open the installer.

    The installer has an Open event that moves the add-in to Application.UserLibraryPath (using Name oldpathname As newpathname), installs the add-in, and quits.

  3. #3
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120
    Quote Originally Posted by shg View Post
    You can have them copy the add-in and the 'installer' to a local folder, and them have them open the installer.

    The installer has an Open event that moves the add-in to Application.UserLibraryPath (using Name oldpathname As newpathname), installs the add-in, and quits.

    Not quite sure I understand 100%, and is there a particular installer i should use?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    No; that's why I put in in quotes. It's a couple of lines of code in the Open event for the workbook, which you could call Installer.xls.

  5. #5
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120
    Quote Originally Posted by shg View Post
    No; that's why I put in in quotes. It's a couple of lines of code in the Open event for the workbook, which you could call Installer.xls.
    any hint as to where I can find these couple lines of code?

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    I thought the guy that wrote the add-in would have provided them ...
    Private Sub Workbook_Open()
        Const sAddIn As String = "myAddIn.xla"
    
        On Error Resume Next
        Name ThisWorkbook.Path & "\" & sAddIn As _
             Application.UserLibraryPath & sAddIn
        If Err.Number Then
            MsgBox "Unable to copy add-in to library. Call 911!"
        Else
            Application.AddIns(Left(sAddIn, InStr(sAddIn, ".") - 1)).Installed = True
            If Err.Number = 0 Then
                MsgBox "Add-in installed."
            Else
                MsgBox "Add-in installation failed"
            End If
            ThisWorkbook.Close SaveChanges:=False
        End If
    End Sub
    Last edited by shg; 09-14-2008 at 08:46 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Auto SUM function not working correctly
    By tomvh444 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-30-2008, 06:46 PM
  2. Removing AddIn From Available List
    By DCSwearingen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2008, 06:21 PM
  3. VBA to enable auto calculation after copying worksheet
    By nockam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-24-2007, 01:20 AM
  4. Addin that needs an Outlook reference
    By peros550 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-22-2006, 08:42 AM
  5. AUTO FILL Problem
    By test1986 in forum Excel General
    Replies: 3
    Last Post: 09-20-2006, 03:55 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1