Application.MacroOptions

Corresponds to options in the Macros dialog box.


Excel

This method can also be used to display user defined functions in the built-in function categories.
Code to set the macro Options

Application.MacroOptions Macro:="MyMacro", _ 
                         Description:="Developed by Better Solutions", _
                         HasMenu:=True, _
                         MenuText:="Run my macro", _
                         HasShortcutkey:=True, _
                         ShortcutKey:="c", _
                         StatusBar:="Please wait ..."

Macro - The macro name or name of the user defined function.
Description - The description text.
HasMenu -
HasShortcutKey - Lets you assign a shortcut key to your macro. If false, no shortcut key is assigned. The default is false.
ShortcutKey - This contains the actual shortcut key when HasShortcutKey is true.
Category - An integer specifying the function category. You can also use a string for a custom category. If you use a name that is the same as a built-in name it is mapped to that category.
StatusBar - The statusbar text for the macro.
HelpContextID - An integer that specifies the context ID for the help topic assigned to the macro.
HelpFile - The name of the help file containing the help topic.
ArgumentDescriptions - (Added in 2010) - A one-dimensional array that contains the descriptions for the arguments to a user defined function. These are displayed in the Function Arguments dialog box.


Word

The method Application.MacroOptions does not exist in Word at the moment.


PowerPoint

The method Application.MacroOptions does not exist in PowerPoint at the moment.



© 2017 Better Solutions Limited. All Rights Reserved. © 2017 Better Solutions Limited

PrevNext