Identify Shortcut Menus


Excel

Public Sub BET_IdentifyShortcutMenu() 
Dim cmdbar As CommandBar
Dim lrownumber As Long

   lrownumber = 1
   For Each cmdbar In CommandBars
      Range("A" & lrownumber).Value = cmdbar.Name
    
'cmdbar.Reset
    
      Select Case cmdbar.Type
               
         Case msoBarTypePopup
               cmdbar.Controls.Add(msoControlButton).Caption = cmdbar.Name
               
      End Select
      lrownumber = lrownumber + 1
   Next cmdbar
End Sub

Word

Public Sub BET_IdentifyShortcutMenu() 
Dim cmdbar As CommandBar
Dim lrownumber As Long

   lrownumber = 1
   For Each cmdbar In CommandBars
      Selection.TypeText cmdbar.Name
      Selection.TypeText vbCrLf
      
      On Error Resume Next
      cmdbar.Reset
     
      Select Case cmdbar.Type
                
         Case msoBarTypePopup
            If cmdbar.Name <> "System" Then
'cmdbar.Controls.Add(msoControlButton).Caption = "BET: " & cmdbar.Name
            End If
                
      End Select
      lrownumber = lrownumber + 1
   Next cmdbar
End Sub


© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited TopPrevNext