Share via


Name.ShortcutKey Property

Excel Developer Reference

Returns or sets the shortcut key for a name defined as a custom Microsoft Excel 4.0 macro command. Read/write String.

Syntax

expression.ShortcutKey

expression   A variable that represents a Name object.

Example

This example sets the shortcut key for name one in the active workbook. The example should be run on a workbook in which name one refers to a Microsoft Excel 4.0 command macro.

Visual Basic for Applications
  ActiveWorkbook.Names(1).ShortcutKey = "K"

See Also