CommandBarButtonClass.ShortcutText Property
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.
Namespace: Microsoft.Office.Core
Assembly: office (in office.dll)
Syntax
'Declaration
Public Overridable Property ShortcutText As String
Get
Set
'Usage
Dim instance As CommandBarButtonClass
Dim value As String
value = instance.ShortcutText
instance.ShortcutText = value
public virtual string ShortcutText { get; set; }
Property Value
Type: System.String
Implements
_CommandBarButton.ShortcutText
Remarks
You can set this property only for command bar buttons that contain an OnAction macro.
Examples
This example displays the shortcut text for the Open command (File menu) on the Microsoft Excel Worksheet menu bar in a message box.