ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need an easy way to remove all commandbars (https://www.excelbanter.com/excel-programming/337720-need-easy-way-remove-all-commandbars.html)

Karoo News

Need an easy way to remove all commandbars
 

Hi I currently use the follwing code to remove commandbars but would like a
simpler code to remove all. Also the first line of this code does not work
in office 95 is there a reason why? Idealy I need to Disable Customizing of
toolbars

'Application.CommandBars.DisableCustomize = True
Application.CommandBars("Toolbar List").Enabled = False
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Control Toolbox").Visible = False
Application.DisplayFormulaBar = False
Application.CommandBars("Tools").Controls("&Custom ize...").Delete
Application.CutCopyMode = False
Call MyMenu

Many Thanks
Neil




Ron de Bruin

Need an easy way to remove all commandbars
 
Hi Karoo

See this page
http://www.rondebruin.com/menuid.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Karoo News" wrote in message ...

Hi I currently use the follwing code to remove commandbars but would like a simpler code to remove all. Also the first line of
this code does not work in office 95 is there a reason why? Idealy I need to Disable Customizing of toolbars

'Application.CommandBars.DisableCustomize = True
Application.CommandBars("Toolbar List").Enabled = False
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Control Toolbox").Visible = False
Application.DisplayFormulaBar = False
Application.CommandBars("Tools").Controls("&Custom ize...").Delete
Application.CutCopyMode = False
Call MyMenu

Many Thanks
Neil





Bob Phillips[_6_]

Need an easy way to remove all commandbars
 
Commandbars don' work in Office 95 at all do they?

Anyway, this disab les them all, including c ontext menus

Dim oCB As CommandBar
For Each oCB In Application.CommandBars
oCB.Enabled = False
Next oCB

--
HTH

Bob Phillips

"Karoo News" wrote in message
...

Hi I currently use the follwing code to remove commandbars but would like

a
simpler code to remove all. Also the first line of this code does not work
in office 95 is there a reason why? Idealy I need to Disable Customizing

of
toolbars

'Application.CommandBars.DisableCustomize = True
Application.CommandBars("Toolbar List").Enabled = False
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Control Toolbox").Visible = False
Application.DisplayFormulaBar = False
Application.CommandBars("Tools").Controls("&Custom ize...").Delete
Application.CutCopyMode = False
Call MyMenu

Many Thanks
Neil






Tom Ogilvy

Need an easy way to remove all commandbars
 
Commandbars were not introduced in Excel until Office 97.

--
Regards,
Tom Ogilvy

"Karoo News" wrote in message
...

Hi I currently use the follwing code to remove commandbars but would like

a
simpler code to remove all. Also the first line of this code does not work
in office 95 is there a reason why? Idealy I need to Disable Customizing

of
toolbars

'Application.CommandBars.DisableCustomize = True
Application.CommandBars("Toolbar List").Enabled = False
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Control Toolbox").Visible = False
Application.DisplayFormulaBar = False
Application.CommandBars("Tools").Controls("&Custom ize...").Delete
Application.CutCopyMode = False
Call MyMenu

Many Thanks
Neil







All times are GMT +1. The time now is 01:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com