Article ID: 157108 - Last Review: November 23, 2006 - Revision: 2.4 XL97: Options Not Available in Macro Options Dialog BoxThis article was previously published under Q157108 SYMPTOMS
In Microsoft Excel 97, if you click the Tools menu, point to Macro, click
Macros, and then click Options, the Macro Options dialog box does not
contain as many controls as in earlier versions of Microsoft Excel.
CAUSE
Some controls were removed from the Macro Options dialog box in Microsoft
Excel 97.
WORKAROUNDMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or Microsoft Advisory Services. For more information, visit these Microsoft Web sites: Microsoft Certified Partners - https://partner.microsoft.com/global/30000104 (https://partner.microsoft.com/global/30000104) Microsoft Advisory Services - http://support.microsoft.com/gp/advisoryservice (http://support.microsoft.com/gp/advisoryservice) For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS (http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms) Most functionality originally provided by the controls in the Macro Options dialog box is available when you run a macro that uses the MacroOptions method. The MacroOptions method in Microsoft Excel uses the following syntax:
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.
Each control in the Macro Options dialog box has a corresponding optional argument that you can add to the MacroOptions method. The following table lists the controls previously available in the Macro Options dialog box and the optional argument that allows you to change the setting in question.
Control MacroOptions Optional Argument
----------------------------------------------------------------------
Description box Description:=<variant, a description of the
macro>
Menu Item On Tools HasMenu:=<variant, True or False>*
Menu check box
Menu Text box MenuText:=<variant, the text that should appear
on the Tools menu>*
Shortcut Key HasShortcutKey:=<variant, True or False>
check box
Ctrl+ box ShortcutKey:=<variant, a text string containing a
single letter, either upper- or lower-case>
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
box the context ID for the help topic assigned to
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, CTRL+j Status Bar Text Test Macro written by J. Tech Help Context ID 15 Help File Name C:\Sample\Testhelp.hlp
Application.MacroOptions Macro:="Test", _
Description:="This is my test macro.", HasShortcutKey:=True, _
ShortcutKey:="j", StatusBar:="Test Macro written by J. Tech", _
HelpContextId:=15, HelpFile:="C:\Sample\Testhelp.hlp"
Note: The arguments marked above with an asterisk (*), HasMenu and MenuText, are ignored in Microsoft Excel 97. This functionality is no longer available. For additional information, please see the following article in the Microsoft Knowledge Base: 157203
(http://support.microsoft.com/kb/157203/EN-US/
)
XL97: Cannot Add Macros to the Tools Menu
STATUS
This behavior is by design of Microsoft Excel 97.
MORE INFORMATION
The Macro Options dialog box in Microsoft Excel version 5.0 and 7.0
contains the following controls.
Control Function
--------------------------------------------------------------------
Description box Allows you to set a description of your macro.
Menu Item On Tools If selected, the macro appears on your Tools
Menu check box menu when the workbook containing the macro
is open.
Menu Text box Allows you to change the name of the macro as
it appears on the Tools menu.
Shortcut Key If selected, allows you to assign a shortcut
check box key to your macro.
Ctrl+ 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 Allows you to set text that is displayed on the
box status bar when a menu item assigned to the
macro is selected.
Help Context ID Allows you to determine what help topic within
box a help file is displayed for your macro.
Help File Name Allows you to assign a help file to the macro.
box
Control Function
-------------------------------------------------------------------
Description box Allows you to set a description of your
macro.
Ctrl+ box Allows you to change the shortcut key assigned
to your macro. Allowed values are a-z and A-Z.
| Article Translations
|

Back to the top
