Looping through Menubars with VBA

  • Thread starter Thread starter J.
  • Start date Start date
J

J.

Hello All!

Is there a way to loop through my list of existing menubars and do a
command on them with vba?

I.E.

For Each X in ?
DoCmd.ShowToolBar "[toolbarname??]", acShowToolbarYes
Next X

or something like that?
 
For each cmdb in application.commandbars
If cmdb.Name = "xxxxx" Then cmdb.Enabled = True '(Conditional)
cmdb.Visible = Not cmdb.Visible '(Toggle)
'etc.

Next
 
Back
Top