XL: Using the /F Switch to Load Add-in Macros

ID: Q100615


The information in this article applies to:


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:

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