View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
jpendegraft[_6_] jpendegraft[_6_] is offline
external usenet poster
 
Posts: 1
Default identifying shortcut keys associated with custom macros

The following code will return what you are after:

Sub ListShortCutMenus()
Row =1
For Each cbar In CommandBars
If cbar.Type = msoBarTypePopup then
Cells(Row, 1) = cbar.Index
Cells(Row, 2) = cbar.Name
For col = 1 To cbar.Controls.Count
Cells(Row, col +2) = _
cbar.Controls(col).Caption
Next Col
Row = Row + 1
End If
Next cbar
End Su

--
Message posted from http://www.ExcelForum.com