ShortcutKey Property

Microsoft Excel Visual Basic

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

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.

ActiveWorkbook.Names(1).ShortcutKey = "K"