Table of contents
Collapse the table of content
Expand the table of content

CommandBarButton.ShortcutText Property (Office)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

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

Note The use of CommandBars in some Microsoft Office applications has been superseded by the new ribbon component of the Microsoft Office Fluent user interface. For more information, search Help for the keyword "ribbon."


expression. ShortcutText

expression A variable that represents a CommandBarButton object.


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


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"). _ 

See also


CommandBarButton Object

Other resources

CommandBarButton Object Members

© 2018 Microsoft