Article ID: 179004
Article Last Modified on 10/10/2006
Application.MacroOptions Macro:=<macroname>, <optional arguments>where <macroname> is the name of the macro whose options you want to change. The optional arguments are separated by commas.
Control MacroOptions Optional Argument
----------------------------------------------------------------------
Description box Description:=<variant, a description of the
macro>
Menu Item In HasMenu:=<variant, True or False>*
'Tools' Menu check
box
Menu Text box MenuText:=<variant, the text that should appear
on the Tools menu>*
Keyboard Shortcut HasShortcutKey:=<variant, True or False>
check box
Option+Cmd+ box ShortcutKey:=<variant, a text string containing a
single letter, either uppercase or lowercase>
Function Category Category:=<variant, a number that specifies the
list box macro function category>
Status Bar Text StatusBar:=<variant, text to appear in the status
box bar when the user points to a menu item
assigned to the macro>
Help Context ID HelpContextId:=<variant, a number that specifies
For This Macro the context ID for the Help topic assigned to
box the macro>
Help File Name HelpFile:=<variant, the name of the Help file
box assigned to the macro>
Option Value ----------------------------------------------- Description This is my test macro. Shortcut Key yes, OPTION+COMMAND+j Status Bar Text Test Macro written by J. Tech Help Context ID 15 Help File Name Help Files:My Help FileYou can set these options by executing the following command in a Microsoft Visual Basic for Applications macro:
Application.MacroOptions Macro:="Test", _
Description:="This is my test macro.", HasShortcutKey:=True, _
ShortcutKey:="j", StatusBar:="Test Macro written by J. Tech", _
HelpContextId:=15, HelpFile:="Help Files:My Help File"
Because the Macro Options dialog box in Microsoft Excel 98 Macintosh
Edition does not contain all of the same controls as in earlier versions of
Microsoft Excel, this is the only method you can use to set most of the
macro options.
157203 XL97: Cannot Add Macros to the Tools Menu
Control Function
--------------------------------------------------------------------
Description box Allows you to set a description of your macro.
Menu Item In If selected, the macro appears on your Tools
'Tools' Menu check menu when the workbook containing the macro
box is open.
Menu Text box Allows you to change the name of the macro as
it appears on the Tools menu.
Keyboard Shortcut If selected, allows you to assign a shortcut
check box key to your macro.
Option+Cmd+ box Allows you to change the shortcut key assigned
to your macro. Allowed values are a-z and A-Z.
Function Category Allows you to select the function category to
list box which the macro belongs. This is usually used
by function macros, as it determines how your
macro is displayed in the Function Wizard.
Status Bar Text StatusBar:=<variant, text to appear in the status
box bar when the user points to a menu item
assigned to the macro>
Help Context ID HelpContextId:=<variant, a number that specifies
For This Macro the context ID for the Help topic assigned to
box the macro>
Help File Name Allows you to assign a Help file to the macro.
box
In Microsoft Excel 98 Macintosh Edition, the Macro Options dialog box
contains fewer controls.
Control Function
-------------------------------------------------------------------
Description box Allows you to set a description of your
macro.
Option+Cmd+ box Allows you to change the shortcut key assigned
to your macro. Allowed values are a-z and A-Z.
You can only change settings for other controls by using a macro using the
MacroOptions method.
Additional query words: XL98 VBE VBA
Keywords: kbcode kbdtacode kbhowto kbprogramming KB179004