Update Links, Scheduled Tasks and UDFs

M

MSweetG222

I have a .xls file which calls a UDF function from an xla addin (I will call
the workbook...MyFile.xls). MyFile.xls also has an Auto_Open procedure.
When run normally MyFile.xls works just fine.

However, when run as a scheduled task, the task hangs awaiting someone to
answer the update links question. The Scheduled Tasks Manager appears to
open the MyFile.xls workbook BEFORE all Add-ins are installed (including the
UDF.xla that it needs).

I found that if the user DOES NOT have the add-in "Analysis ToolPak -
VBA/ATPVBAEN.xla" installed, they will receive the "Update Links" question.

If they do have the "Analysis ToolPak - VBA/ATPVBAEN.xla" installed, they DO
NOT receive the "Update Links" question.

When running the MyFile.xls from the Scheduled Task Manager -- once the user
has the "Analysis ToolPak - VBA/ATPVBAEN.xla" installed, ALL Add-ins load
BEFORE the MyFile.xls workbook is opened (This is not the case if the
ATPVBAEN.xla is not installed. The MyFile.xls opens before all .XLAs, COMs,
etc. are opened).

Can anyone tell me what the "Analysis ToolPak - VBA/ATPVBAEN.xla" is doing
that would cause all .XLAs, COMs, etc. to load prior to the MyFile.xls
workbook being opened when called from the Scheduled Task Manager? I would
rather not use the ATPVBAEN.xla if it is not required for the workbook.
However, this situation is forcing me to have it installed even though it is
not needed for the VBA code.

Thank you for your assistance.
 
T

Tom Ogilvy

Add code in the workbook open event of the Myfile.xls to load the addin if it
isn't loaded.

Microsoft states that when excel is started with code, addins are not
loaded. I would see the schedular as starting Excel from code (although I
have never used it), so if you are getting different results, I can't say.
 
M

MSweetG222

Tom,
Thank you for your response.
I believe the stmt Microsoft made is only true if the "Analysis ToolPak -
VBA/ATPVBAEN.xla" is NOT clicked as an Add-In on the users computer. If it
is click ON, then ALL add-ins (.xla & COMs) appear to load BEFORE the target
workbook is opened. There is something in the ATPVBAEN.xla that is forcing
all Add-Ins to load prior to the target workbook being opened by the Task
Scheduler. I think that is odd.
--
Thx
MSweetG222

=========================

Add code in the workbook open event of the Myfile.xls to load the addin if it
isn't loaded.

Microsoft states that when excel is started with code, addins are not
loaded. I would see the schedular as starting Excel from code (although I
have never used it), so if you are getting different results, I can't say.
 

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