ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide toolbars (https://www.excelbanter.com/excel-programming/289725-hide-toolbars.html)

Lawlera

Hide toolbars
 
Is there VBA code similar to

Application.CommandBars(1).Enabled = False

but to hide all the toolbar icons

Thanks in anticipation

pikus

Hide toolbars
 
For example, to hide the "View" menu:

Application.CommandBars("Worksheet Menu Bar").Controls("View").Visibl
= False

- Piku

--
Message posted from http://www.ExcelForum.com


Ron de Bruin

Hide toolbars
 
but to hide all the toolbar icons?

Do you mean all toolbars??

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Lawlera" wrote in message ...
Is there VBA code similar to

Application.CommandBars(1).Enabled = False

but to hide all the toolbar icons?

Thanks in anticipation




Ron de Bruin

Hide toolbars
 
Hi lawlera

Use this then
It also hide the Worksheet menu bar

Sub hide()
Dim bar As CommandBar
For Each bar In Application.CommandBars
bar.Enabled = False
Next
End Sub

Sub show()
Dim bar As CommandBar
For Each bar In Application.CommandBars
bar.Enabled = True
Next
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"lawlera" wrote in message ...
Yes!!





All times are GMT +1. The time now is 11:42 PM.

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