Looping through Menubars with VBA

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?
 
N

Nikos Yannacopoulos

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

Next
 
Top