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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turning off all Excel 2000 toolbars ? 2

Status
Not open for further replies.

vamoose

Programmer
Oct 16, 2005
320
MX
I know this will work for each individual toolbar:

Application.CommandBars("Visual Basic").Visible = False

But can all toolbars be turned off without specifically calling out each one ?

Thanks. :)
 


Hi,

Check out the ToolBars Collection. You cannot turn ALL the toolbars off.

Skip,

[glasses] [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is…
POULTRY in motion to PULLET for a PALTRY amount! [tongue]
 
Try something like:
Code:
Dim CBar As CommandBar

   For Each CBar In Application.CommandBars
     With CBar
       If (.Type <> msoBarTypeMenuBar) And .Visible Then
         .Visible = False
       End if
     End With
   Next CBar

The test for the Type property is because you cannot hide the Menubar (although you could substitute a custom Menubar)


Regards,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top