Share via


ShortcutText Property

Returns or sets the shortcut key text displayed next to a button control when the button appears on a menu, submenu, or shortcut menu. Read/write String.

Remarks

You can set this property only for command bar buttons that contain an OnAction macro.

Example

This example displays the shortcut text for the Open command (File menu) on the Microsoft Excel Worksheet menu bar in a message box.

MsgBox (CommandBars("Worksheet Menu Bar"). _
    Controls("File").Controls("New...).ShortcutText)

Applies to | CommandBarButton Object

See Also | Overview of the Office Assistant