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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top