• Add-in not working (2000)

    Author
    Topic
    #369803

    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

    Viewing 1 reply thread
    Author
    Replies
    • #583191

      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.

    • #583336

      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 ). 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.

      • #583344

        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?

        • #583352

          Dim oXL as Object
          set oXL=CreateObject(“Excel.Application”)
          With oXL.AddIns.Add(FileName:=”PathToAndNameOfTheAddIn”)
          .Installed = True
          End With

          • #583361

            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?

            • #583367

              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.

    Viewing 1 reply thread
    Reply To: Add-in not working (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: