ShortcutMenuBar Property

Applies To

Application Object, Bound Object Frame Control, Chart Control, Check Box Control, Combo Box Control, Command Button Control, Form, Image Control, Label Control, List Box Control, Option Button Control, Option Group Control, Report, Toggle Button Control, Unbound Object Frame Control.

Description

You can use the ShortcutMenuBar property to specify the menu bar macro to use to display a shortcut menu when you right click on a form or control.

Setting

You set the ShortcutMenuBar property using the name of a menu bar macro.

You can set the ShortcutMenuBar property in the form or control’s property sheet, a macro, or using Visual Basic.

For controls on forms, you can also set this property using the control’s default control style.

In Visual Basic, set this property using a string expression that is the name of the menu bar macro you want to run.

Tip To create a menu bar macro, you can use the Menu Builder by clicking the Build button in the ShortcutMenuBar property box of the form or control you want to attach the menu to. The Menu Builder creates and names the menu bar macro and the macro group containing the actions for the menu commands on the menus you create.

Remarks

The macro specified in the ShortcutMenuBar property must contain a single AddMenu action that specifies the name of another macro that defines the menu itself.

Shortcut menus are not available to any object if the AllowShortcutMenus property is set to False.

See Also

AddMenu Action, AllowShortcutMenus Property, MenuBar Property, ShortcutMenu Property.