Re: How to load Excel startup files through code
- From: "Chip Pearson" <chip@xxxxxxxxxxxx>
- Date: Wed, 3 May 2006 10:02:10 -0500
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
<e'kong.tse@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1146666314.139144.94110@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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
.
- References:
- How to load Excel startup files through code
- From: e'kong . tse
- How to load Excel startup files through code
- Prev by Date: RE: Only print cells with value Part 2
- Next by Date: RE: Internet Table Transfer
- Previous by thread: How to load Excel startup files through code
- Next by thread: Re: Business Days Including Holidays
- Index(es):
Relevant Pages
|
Loading