Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
When do AddIns load?
Due to the way that Excel locks XLA's when loaded from the network,
we're trying to lazy-load them when needed. We have a single very small XLA that's put into the AddIns, with a single exposed sub that you can call to load other XLAs on demand. This seems to work well when you do everything inside Excel, but I notice it doesn't work if you call Excel from another program, in this case Access. When you open Excel using CreateObject, there's no AddIns at all. Is there something I need to do to trigger Excel to load them up? Here's the code, it fails on the application.run... On Error Resume Next bStarted = False Set oExcelApp = GetObject(, "Excel.Application") If Err < 0 Then ' excel wasn't running, start it from code Set oExcelApp = CreateObject("Excel.Application") bStarted = True End If On Error GoTo 0 oExcelApp.Visible = True ' make sure that HPLCreate is open and up to date ret = oExcelApp.Application.Run("ModuleLoader.xla! LoadAndUpdateAllModulesInXLA", "HPLCreate") |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
When do AddIns load?
You can open them yourself.
oExcelApp.workbooks.open("C:\yourpath\ModuleLoader .xla") (That's the way automation works.) Maury Markowitz wrote: Due to the way that Excel locks XLA's when loaded from the network, we're trying to lazy-load them when needed. We have a single very small XLA that's put into the AddIns, with a single exposed sub that you can call to load other XLAs on demand. This seems to work well when you do everything inside Excel, but I notice it doesn't work if you call Excel from another program, in this case Access. When you open Excel using CreateObject, there's no AddIns at all. Is there something I need to do to trigger Excel to load them up? Here's the code, it fails on the application.run... On Error Resume Next bStarted = False Set oExcelApp = GetObject(, "Excel.Application") If Err < 0 Then ' excel wasn't running, start it from code Set oExcelApp = CreateObject("Excel.Application") bStarted = True End If On Error GoTo 0 oExcelApp.Visible = True ' make sure that HPLCreate is open and up to date ret = oExcelApp.Application.Run("ModuleLoader.xla! LoadAndUpdateAllModulesInXLA", "HPLCreate") -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
addins dont load when launched by access | Excel Programming | |||
Changing the order the addins load | Excel Discussion (Misc queries) | |||
how to load addins in Excel | Excel Discussion (Misc queries) | |||
Load On Demand Addins | Excel Programming | |||
As Addins load question | Excel Programming |