Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All
I just created an excel template and I want to know how to hide the standard & formating toolbars as well as the main menus of Excel, when anyone opens this template. TIA. JD |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Application.Commandbars("Worksheet Menu Bar").Enabled = False Application.Commandbars("Standard").Visible= False Application.Commandbars("Formatting").Visible= False Put this code in the workbook open event, and reset it on workbook close, or even deactivate. -- HTH RP (remove nothere from the email address if mailing direct) "Jennifer" wrote in message ... Hi All I just created an excel template and I want to know how to hide the standard & formating toolbars as well as the main menus of Excel, when anyone opens this template. TIA. JD |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
or...
public sub Handlebars(byval xEnable as boolean) dim oBar as commandbar ' disable/enable ALL builtin commandabrs (toolbars & menus!) for each obar in application.commandbars if obar.builtin then obar.enabled=not xEnable end if next end sub then all you do is call it from the Workbook_Open event handler like this: Handlebars true << and in the Workbook_beforeclose event like this: Handlebars false << of course, you will have to modify as needed, for example, if you still want the user to be able to right-click on a worksheet or cell and show the popup menus... also, be careful with code like this, if for example you turn event-handlers off sometime when the workbook is open (Application.enableevents=false) and excel crashes, then it won't put them back and you have to do it the awkward way to reset them again! Perhaps therefore it's better to use .Visible = false instead of disabling them... all depends on why, and if it's a problem when the users show the toolbars themselves through the Customize dialog by double-clicking in the commandbar area at the top of Excel... hth Philip "Bob Phillips" wrote: Application.Commandbars("Worksheet Menu Bar").Enabled = False Application.Commandbars("Standard").Visible= False Application.Commandbars("Formatting").Visible= False Put this code in the workbook open event, and reset it on workbook close, or even deactivate. -- HTH RP (remove nothere from the email address if mailing direct) "Jennifer" wrote in message ... Hi All I just created an excel template and I want to know how to hide the standard & formating toolbars as well as the main menus of Excel, when anyone opens this template. TIA. JD |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jennifer
See also http://www.rondebruin.com/menuid.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Jennifer" wrote in message ... Hi All I just created an excel template and I want to know how to hide the standard & formating toolbars as well as the main menus of Excel, when anyone opens this template. TIA. JD |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
hide the menubars and toolbars | Excel Discussion (Misc queries) | |||
hide toolbars, menu bar, etc | Excel Discussion (Misc queries) | |||
close (hide) toolbars | Excel Discussion (Misc queries) | |||
Hide toolbars | Excel Programming | |||
Hide all toolbars auto_open | Excel Programming |