Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Apr 2002
    Location
    Texas, USA
    Posts
    208
    Thanks
    0
    Thanked 1 Time in 1 Post

    Add-in not working (2000)

    I have a laptop with an Add-in that loads when Excel is opened directly. There is another program that loads Excel programmatically along with a specified xlf file but the Add-in does not appear to load when Excel is loaded this way. The first thing that keyed me in was that specific vba commands that are suppose to run when the xls file is loaded into Excel programmatically do not run. Also, in the VB Editor Project Explorer the Add-in is no where to be found.
    In the case where I open Excel non-programmatically, the Add-in displays in the VB Editor Project Explorer.
    Any Thoughts??

    Thanks
    Ed

  2. #2
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add-in not working (2000)

    Just a thought: consider loading your add-in programmatically in the case where it does not show up in the project explorer, then you might find out the reason why.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add-in not working (2000)

    When you start Excel using Automation, no add-ins are loaded and the files in XLSTART are also ignored. You can mimic this behaviour by using the /Automation switch when starting XL from the commandline:

    Start, Run,
    "C:Program FilesMicrosoft OfficeOfficeExcel.exe" /Automation

    So you must write code that loads the add-ins you need *or* create a reference to those addins in the workbook that needs them (In the VBE: Tools, references, browse).

    When a workbook is loaded through code, the AutoMacros (a remnant from xl5/95) do not run (by design <g>). You will need the RunAutoMacros methos for that.

    Alternatively you could put your starting code in the thisworkbook module, using the Workbook_Open event. These events fire regardless of how you opened the workbook.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  4. #4
    3 Star Lounger
    Join Date
    Apr 2002
    Location
    Texas, USA
    Posts
    208
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Add-in not working (2000)

    Thanks for the info. I searched all over the MS website and Excel/VBA help and could not find that info anywhere. There was one reference about this but it did not list Excel 2000 along with the other Excel versions.
    Could you provide an example of how to load the Add-in manually?

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add-in not working (2000)

    Dim oXL as Object
    set oXL=CreateObject("Excel.Application")
    With oXL.AddIns.Add(FileName:="PathToAndNameOfTheAddIn" )
    .Installed = True
    End With
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  6. #6
    3 Star Lounger
    Join Date
    Apr 2002
    Location
    Texas, USA
    Posts
    208
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Add-in not working (2000)

    What if you do not know the path to the Add-in? Is there some way to retrieve this info from Excel? When you add the Add-in via Tools - Add-ins you can link to and add-in anywhere and Excel still keeps track of that location and finds the Add-in when you open Excel. Anyway to do the same manually?

  7. #7
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Add-in not working (2000)

    I believe it's in the registry under HKCUSoftwareMicrosoftOffice9.0ExcelOptions
    - there are various OPEN keys (OPEN, OPEN1 etc.) with the add-ins listed.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

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