Results 1 to 3 of 3

can't update a master add-in!

Threaded View

  1. #1
    Forum Contributor
    Join Date
    06-14-2010
    Location
    Toronto,Canada
    MS-Off Ver
    Excel 2003
    Posts
    145

    can't update a master add-in!

    Hi,
    I have never worked with add-in before and I am having problems. I am using a master add-in to reference code for over 100 files. I know how to install the add-in and it's reference by VBA. But when I update the code in master add-in (which btw gives a pop-up "xxx.xla is already open" when I open it), all other files reference the old add-in and are not updated by master add-in. Below is my WorkbookOpen event code: What am I doing wrong?
       On Error Resume Next
        'add the add-in
        If AddIns("Cclmodules_Tel").Installed = False Then
           AddIns.Add("\\cadd-ntsrv00\cadd-drv\Shared_Files\Cable Material Catalogue\CCLModules_TEL.xla", True).Installed = True
        End If
        
        'add the add-in reference
        Dim i As Integer, refExists As Boolean
        refExists = False
        For i = 1 To ThisWorkbook.VBProject.References.Count
            If ThisWorkbook.VBProject.References(i).Name = "TELModules" Then
                refExists = True
                Exit For
            End If
        Next i
        If Not refExists Then ActiveWorkbook.VBProject.References.AddFromFile Environ("AppData") & "\Microsoft\AddIns\CCLModules_TEL.xla"
    
    '    Application.Run "CCLModules_Tel.xla!WorkbookOpenEvent"
        
    '    if an error other than  32813 appeared means there is a problem, add that library manually
        If Err <> 0 And Err <> 32813 Then
            MsgBox "One or more VBA Object libraries not loaded properly." & vbCrLf _
                    & "Error " & Err.Number & ": " & Err.Description
        End If
    Last edited by adds007; 04-18-2011 at 09:00 AM.

Thread Information

Users Browsing this Thread

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

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