Gruppe
Menue
Problem
Wie kann ich alle Kontextmenüs mit ihren Elementen in einem Arbeitsblatt auflisten lassen?
StandardModule: basMain
Sub ListShortCutMenus()
Dim oBar As CommandBar
Dim iRow As Integer, iCounter As Integer
Application.ScreenUpdating = False
For Each oBar In Application.CommandBars
If oBar.Type = msoBarTypePopup Then
iRow = iRow + 1
Cells(iRow, 1) = oBar.Index
Cells(iRow, 2) = oBar.Name
For iCounter = 1 To oBar.Controls.Count
Cells(iRow, iCounter + 2) = _
oBar.Controls(iCounter).Caption
Next iCounter
End If
Next oBar
Cells.EntireColumn.AutoFit
End Sub