Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
addins dont load when launched by access Daniel M Excel Programming 1 November 30th 07 12:06 PM
Changing the order the addins load havenlad Excel Discussion (Misc queries) 2 June 16th 07 12:13 AM
how to load addins in Excel ccharles Excel Discussion (Misc queries) 1 April 14th 05 01:53 AM
Load On Demand Addins Vikram Kohli[_2_] Excel Programming 8 May 4th 04 07:57 AM
As Addins load question Stuart[_5_] Excel Programming 4 July 12th 03 09:22 PM


All times are GMT +1. The time now is 09:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"