OFFICE 自带功能application.commandbars()中参数的意义
application.commandbars("Standard").visible=false
Sub ShowShortcuts() Dim Ctrl As CommandBarControl Dim i As Integer Application.ScreenUpdating = False On Error Resume Next i = 1 For Each Ctrl In CommandBars.FindControls If Ctrl <> "" Then Cells(i, 1) = Ctrl.Parent.Name Cells(i, 2) = Ctrl.accKeyboardShortcut Cells(i, 3) = Ctrl.accName Cells(i, 4) = Ctrl.accDescription Cells(i, 5) = Ctrl.ID Cells(i, 6) = Ctrl.Enabled Cells(i, 7) = Ctrl.Height Cells(i, 8) = Ctrl.Left Cells(i, 9) = Ctrl.Top i = i + 1 End If Next Columns("A:E").AutoFit Application.ScreenUpdating = True End Sub