Opening An Excel Application and "Analysis ToolPac" does not load

G

Guest

When I open an Excel Application via VBA the Analysis ToolPac functions are
not loaded. (Specially I want to see the function "EDATE" but there are
others nice functions.)

VBA:
Dim appWB As Excel.Application

Set appWB = CreateObject("Excel.Application")
appWB.Workbooks.Open Filename:="c:\mydocs\myXLWB.xls", ReadOnly:=False
appWB.Visible = True

Even when I set the addins property to True they are not recognized:

'Install Analysis Tool pack
AddIns("Analysis ToolPak").Installed = True

Any Suggestions?

Thank you,
Mark
 
B

Bob Phillips

When you start Excel via automation, the addins are not automatically
loaded, you need to do it manually.

Here is an MS article on it

http://support.microsoft.com/kb/q213489/
XL2000: Add-Ins Don't Load When Using the CreateObject Command

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
T

Tim Williams

Add-ins do not load when Excel is opened using automation: you have to add
them in code once excel is open.

Tim
 
W

Walt Weber

Hi Mark,

I agree, it's an incredibly useful addin (In my mind, it
should be part of the standard load of functions). I've
found that AddIns("Analysis ToolPak").Installed = True
' works consistently if Excel is originally installed in
the 'Custom' configuration wherein the Analysis ToolPak is
loaded to the hard drive (Though I'm not certain about
Excel 2003, it was NOT part of the default install in
earlier versions).

Perhaps your Excel installation never loaded it to the
hard drive in the first place.

Best Regards,
Walt
-----Original Message-----
When I open an Excel Application via VBA the Analysis ToolPac functions are
not loaded. (Specially I want to see the function "EDATE" but there are
others nice functions.)

VBA:
Dim appWB As Excel.Application

Set appWB = CreateObject("Excel.Application")
appWB.Workbooks.Open
Filename:="c:\mydocs\myXLWB.xls", ReadOnly:=False
 
G

Guest

Thank you - this did the job

Bob Phillips said:
When you start Excel via automation, the addins are not automatically
loaded, you need to do it manually.

Here is an MS article on it

http://support.microsoft.com/kb/q213489/
XL2000: Add-Ins Don't Load When Using the CreateObject Command

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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