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

disabling toolbars

Status
Not open for further replies.

isma786

Technical User
Apr 7, 2004
31
US
I have an excel sheet that have specified user input cells and one button to print and another to exit. I have managed to un-enable the view of toolbars but how do you disable the main dropdowns?
 
Hi isma786,

Not entirely sure what you're asking, but take a look at FAQ707-4841. You should find help in there.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Hi isma786,

You have to use vba to do this. As a starting point try the following code, calling the disable sub from the workbook on open event, and the disable routine from the before close event. It would probably be a good idea to call them from a couple of buttons, before you set them up to be auto, just to be sure that they are doing what you wanted.

Sub DisableAllShortcutMenus()

CommandBars("Toolbar List").Enabled = False
CommandBars("Worksheet Menu Bar").Enabled = False
CommandBars("System").Enabled = False
CommandBars("Standard").Visible = False
CommandBars("Formatting").Visible = False

End Sub

Sub EnableAllShortcutMenus()

CommandBars("Toolbar List").Enabled = True
CommandBars("Worksheet Menu Bar").Enabled = True
CommandBars("System").Enabled = True
CommandBars("Standard").Visible = True
CommandBars("Formatting").Visible = True


End Sub

Chris

IT would be the perfect job......if it didn't have users!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top