XL: Using the /F Switch to Load Add-in Macros
ID: Q100615
|
The information in this article applies to:
-
Microsoft Excel for Windows, versions 4.0, 4.0a, 5.0
-
Microsoft Excel for the Macintosh, version 4.0
SUMMARY
An OPEN= statement in your Microsoft Excel settings file (EXCEL4.INI in
version 4.0 for Windows, EXCEL5.INI in version 5.0 for Windows, or Excel
Settings (4) on the Macintosh) will open the specified document
automatically at startup. In addition, you can use one or both of the
following switches to control how this document is opened:
/R causes the document to be opened read only
-and-
/F causes the document to be fast loaded.
"Fast load" means that a document is setup for use in Microsoft Excel; its
added functionality is available in dialog boxes, but the file itself is
not actually loaded until this functionality is selected.
When you use this switch to open an add-in macro, /F lists all of your add-
in's custom function macros in the Paste Function dialog box. However, to
get the "fast load" functionality, the add-in macro must also contain the
defined name __DemandLoad. With the combined /F switch on the OPEN= line
and the __DemandLoad defined name, the actual add-in is not loaded until
you enter or recalculate one of its custom functions.
NOTE: The actual definition of __DemandLoad is not important; you can use
the Boolean value of TRUE, for example.
MORE INFORMATION
The /F switch behaves as follows depending on the type of document you
are loading on the OPEN= line:
- Template: the template is placed in the New dialog box (from the
File menu, choose new).
- Macro Sheet: All custom functions on that macro sheet are placed in
the Paste Function dialog box; the macro sheet is opened when one
of those functions is used.
- Add-in Macro Sheet: All custom functions are placed in the Paste
Function dialog box. The add-in file will load when you use one of
its custom functions ONLY when the name __DemandLoad is ALSO
defined on the add-in sheet. Unless you have both components, /F in
the settings file and __DemandLoad on the add-in sheet, the add-in
will not load on demand but instead will be fully loaded when you
start Microsoft Excel.
The easiest method for adding an OPEN= statement to your settings file
automatically is to use the Add-ins command (located on the Options
menu). In the Add-in Manager, when you select an add-in to add to the
startup list, the Add-in Manager writes an OPEN= line in the settings
file for you. If the add-in you're adding contains the __DemandLoad
defined name, the Add-in Manager includes the /F switch on the OPEN=
line.
Alternatively, you can directly edit the settings files. In the Microsoft
Windows operating environment, you can use a text editor to add OPEN=
statements, as well as other settings, to the EXCEL4.INI file (version 4.0
for Windows) or the EXCEL5.INI file (version 5.0 for Windows). See the
EXCEL4INI.TXT file for additional information. If you are using Microsoft
Excel for the Macintosh, the counterpart to the EXCEL4.INI file is the
Excel Settings (4) file. To make modifications to the Excel Settings (4)
file, you must use the ResEdit utility. ResEdit is available through
Macintosh user groups, or the Apple Programmers and Developers Association
(APDA).
REFERENCES
"EXCELINI.TXT"
"SDK User's Guide," page 441
Additional query words:
4.00a 5.0
Keywords :
Version : WINDOWS: 4.0,4.0a,5.0; MACINTOSH: 4.0
Platform : MACINTOSH WINDOWS
Issue type : kbhowto
Last Reviewed: April 5, 1999