When do AddIns load?

M

Maury Markowitz

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")
 
D

Dave Peterson

You can open them yourself.

oExcelApp.workbooks.open("C:\yourpath\ModuleLoader.xla")

(That's the way automation works.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top