XL: Add-in Macro Fails to Load when Starting ExcelID: Q100614
|
When you automatically load an add-in macro sheet, the add-in may appear to
fail to load. All of the add-in custom functions appear in the Formula
Paste Function dialog box, but none of its custom menu commands appear.
The primary method for automatically loading a document when you start
Microsoft Excel is to place the file in your startup directory:
This problem occurs when the name __DemandLoad is defined in the add-in
sheet and either of the following is true:
When the name __DemandLoad (note that the string "DemandLoad" is preceded
by two underscores) is defined on the add-in macro sheet, the add-in file
is not actually loaded until you open it from the Open dialog box or until
one of its custom functions is entered into a sheet or is recalculated.
In essence, the add-in is loaded into memory upon demand. This saves time
and memory when you start Microsoft Excel.
Because the add-in macro is not loaded, any auto open macros that add
custom menu commands or run other command macros are not executed. Only
custom functions are added when __DemandLoad is defined on your sheet. If
your add-in macro sheet contains both types of macros, you can remove the
defined name __DemandLoad from your add-in sheet and save it to your
startup directory. When you start Microsoft Excel, this loads the add-in,
executes any auto open macros, and adds custom functions to the Paste
Function dialog box.
Alternatively, if you want the add-in macro to load on demand when one of
its custom functions or custom menu commands is called, in addition to
__DemandLoad, add the defined names __Command and/or __Menu, to your add-in
sheet and then use the Add-in Manager to add your add-in to the startup
list contained in your EXCEL4.INI file (Windows) or Excel Settings (4) file
(Macintosh). The Add-in Manager checks for these defined names and performs
the specified action.
<Menu_Bar_Num> Menu bar number
<Menu Name> Menu the command should be added to
<Command Name> Name of the command to be added
<Macro text> Name of the macro to run when command is selected
<Position> Position of command on the menu
<Key> Macro shortcut key
<Status> Message to be displayed on the Status bar
<Help> Help topic number
B1: 1 C1: Options D1: Create Report E1: SalesRpt
={1,"Options","Create Report","SalesRpt"}
<Menu_Bar_Num> Number of the bar you want to add the menu to
<New Menu> The name of your menu
<Position> Position of the menu on the bar
"EXCELINI.TXT"
"SDK User's Guide," page 441
Additional query words: 4.00a 5.0 excel.ini
Keywords : xladdins
Version : WINDOWS: 4.0, 4.0a, 5.0; MACINTOSH: 4.0
Platform : MACINTOSH WINDOWS
Issue type : kbprb
Last Reviewed: April 6, 1999