Applies To
ToolbarButton Object.
Description
The button identification number of the button (built-in buttons only). Read-only.
Example
This example displays the button ID number for button one on the Formatting toolbar.
buttonId = Toolbars("Formatting").ToolbarButtons(1).Id MsgBox "This button's ID number is " & buttonId
This example creates a two-column list of the button names and button ID numbers for the Standard toolbar. The list is placed in the first two columns on worksheet one.
i = 1 For Each btn In Toolbars("Standard").ToolbarButtons If btn.IsGap = False Then Worksheets(1).Cells(i, 1) = btn.Name Worksheets(1).Cells(i, 2) = btn.Id i = i + 1 End If Next btn