The case: I use task scheduler that opens excel and a macro is being executed on Workbook_Open
. The macro uses a COM Add-in.
The problem: When started from the Task scheduler I get an error that the addin dll is not found and the add-in is missing from the ribbon. Several seconds after accepting the error the add-in appears in the ribbon.
When Excel is started manually, it works fine.
I tried many options but none of them makes the addin to appear in the ribbon before any code is executed.
If someone can help with this I will be grateful.
Private Sub Workbook_Open()
Set m_syncMgr = CreateSynchronizationMgr
Application.Run "PLLoginEventHandler"
On Error GoTo ErrHandler
Call TaskGFS
This is the code on Workbook_Open
, CreateSynchronizationMgr
is a function that creates an object from the add-in dll.
The question is how to load the COM add-ins before any code is being executed when Excel is being started from task manager.