Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Mar 2001
    Posts
    309
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Add-In's (Excel 2002)

    I stored my add-in into
    Drogram filesmicrosoft officeofficeadd ins*

    Here is my problem....
    I built a spreadsheet with an "add-in" function called ERLB_p()
    I send a friend the excel file along with the add-in file
    he put the add-in where it belongs in his office folder.
    when he opens my file the cell points to my hard drive
    'D:ProfilesjsforbesApplication DataMicrosoftAddInserlang_addin.ecf'!ERLB_p(B68,B6 9)
    although on my machine it just says
    =ERLB_p)(B68,B69).
    How do I make it so he doesn't have to remove the full pathname each time I send him a new file?

  2. #2
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Add-In's (Excel 2002)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> d_perotto

    MS-Excel is "smarter" than you think. It copies the file path to the Add-In and stores it.

    I am not sure if there is a better way than just do a global find and replace for the path to the actual path that your friend will have.

    Some times opening and saving the workbook and Add-In may help.

    This is what MS gave us to work with, maybe I'll muddle over it this weekend and see what I can come up with.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add-In's (Excel 2002)

    I think that you need to open the workbook, and then go to Tools/Addins and uncheck the addin. and click OK to close the dialog box. Then go back to Tools/Addins and check the addin and again click OK to close the dialog box. That should fix the path problem. On some versions of Excel, you may have to save and close the workbook between unchecking and checking the addin.
    Legare Coleman

  4. #4
    New Lounger
    Join Date
    Mar 2003
    Location
    Minneapolis, Minnesota, USA
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add-In's (Excel 2002)

    I have clients all over my company who share workbooks and they often end up with my addin xla files in different places. If you cannot enforce I consistent location for the file, I have found that this routine in a class of my addin will update the path to my function by looking at the links in the workbook. I've used this in Excel 97 and 2000. The only problem is that the user is still ask by Excel what they want to do about the links before my code can run. In the end, it doesn't matter what they respond.
    Not shown is the form I display frmUpdateLinks and the WhereAmI() function that is simply returning ThisWorkbook.Path
    Also, my beautiful indents are gone [img]/forums/images/smilies/sad.gif[/img]

    Public WithEvents App As Application

    Private Sub App_WorkbookOpen(ByVal Wb As Workbook)

    Dim blnFound As Boolean
    Dim I As Integer

    alinks = Wb.LinkSources(xlExcelLinks)
    If Not IsEmpty(alinks) Then
    For I = 1 To UBound(alinks)
    If InStr(1, UCase(alinks(I)), "ACTUARIAL.XLA", vbTextCompare) > 1 Then
    If UCase(alinks(I)) <> UCase(WhereAmI() & "ACTUARIAL.XLA") Then
    Call ChangeALink(Wb, alinks(I))
    End If
    End If
    Next I
    End If

    End Sub

    Private Sub ChangeALink(ByVal Wb As Workbook, ByVal LinkName As String)
    frmUpdateLinks.Show
    Wb.ChangeLink Name:=LinkName, NewName:= _
    WhereAmI() & "ACTUARIAL.XLA", Type:= _
    xlExcelLinks
    frmUpdateLinks.Hide
    End Sub

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Add-In's (Excel 2002)

    Off topic: see the thread starting at <post#=189637>post 189637</post#> for different methods to preserve indentation in a post.

Posting Permissions

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