Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control Buttons Id 1

Status
Not open for further replies.

simoncpage

Programmer
Apr 4, 2002
256
GB
Anyone have a list of ids for control buttons i.e ID:=21 is for cut??

Any help would be great!
 
Not a definative answer but I'm short of time at the mo'
Try this for each bar, it'll get you on your way

Sub test2()
Dim ctl
For Each ctl In CommandBars("Standard").Controls
Debug.Print ctl.Id, ctl.Caption,
Next ctl
End Sub

Happy Friday
;-)
 
Actually, hold that thought.
I did the above on xl97 and it worked fine. Now I'm back on my Office2000 machine it's not working.

:-(
 
My poor little pc isn't having a nice day :-( BSODs and all.

Anyway, the code I said didn't work on xl2k does and is amended below to list each control on each command bar.

Sub test2()
Dim ctl, cbar
On Error Resume Next
For Each cbar In CommandBars
Debug.Print cbar.Name, cbar.Index
For Each ctl In CommandBars(cbar.Name).Controls
Debug.Print ctl.ID, ctl.Caption
Next ctl
Next
End Sub

(Not so) Happy Friday (for my pc)
;-)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top