Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm trying to open up an Excel file (.xls) through code. That file uses some function located in a Excel Add-in file(.xla). Everything is fine if I open up that file directly in Excel and the startup file is specified under Tools-Options-General. However, when I try to open up the .xls file through code, the add-in file isn't open and so I get errors in my .xls file. Does anyone know how I can load the startup files through code? Thanks! E'Kong |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When you start Excel through code, it doesn't run its startup
procedures, in order to minimize startup time. You'll have to run startup procedures manually from your code. E.g, Sub Workbook_Open() Dim FName As String Application.AddIns("Analysis ToolPak").Installed = True FName = Dir(Application.Path & "XLStart\*.xls") Do Until FName = "" Workbooks.Open Application.Path & "XLStart\" & FName FName = Dir() Loop FName = Dir(Application.AltStartupPath & "\*.xls") Do Until FName = "" Workbooks.Open Application.AltStartupPath & "\" & FName FName = Dir() Loop End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com wrote in message ups.com... Hi, I'm trying to open up an Excel file (.xls) through code. That file uses some function located in a Excel Add-in file(.xla). Everything is fine if I open up that file directly in Excel and the startup file is specified under Tools-Options-General. However, when I try to open up the .xls file through code, the add-in file isn't open and so I get errors in my .xls file. Does anyone know how I can load the startup files through code? Thanks! E'Kong |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Toolbar should not load at startup | Excel Discussion (Misc queries) | |||
Excel Startup Files | Excel Programming | |||
Unable to load files from alternate startup folder | Excel Discussion (Misc queries) | |||
Automatically opening several Excel Files at startup | Excel Discussion (Misc queries) | |||
Load Sheet2 on Startup?? | Excel Programming |