View Full Version : Worksheet Menu Bar
boxcaru
01-25-2006, 09:37 AM
Hello,
Does anyone know if it is possible to completely remove the Worksheet Menu bar from an Excel spreadsheet using VBA code?
Thanks
XLGibbs
01-25-2006, 09:43 AM
Yes
Sub disableWorksheetMenu()
Application.CommandBars(1).Enabled = False
End Sub
Zack Barresse
01-25-2006, 09:54 AM
Hello,
No, you cannot remove it. But you can make it's Enabled property False; don't try to make it Visible, that will fail. :yes
..
Option Explicit
Sub ToggleWMB()
' On Error Resume Next
With Application.CommandBars("Worksheet Menu Bar")
If .Visible = True Then
.Enabled = False
Else
.Enabled = True
End If
End With
End Sub
Edit: Doh! Too slow for Gibbs again! LOL!
Bob Phillips
01-25-2006, 09:57 AM
Hello,
No, you cannot remove it. But you can make it's Enabled property False; don't try to make it Visible, that will fail. :yes
As I understand the word remove, that is removing it. It was there, it is now somewhere else, it is removed. It is not deleted, but that was not what was asked.
Zack Barresse
01-25-2006, 10:00 AM
I considered the word "removed" as "deleted", hence my post, but I see your point. :yes
boxcaru
01-25-2006, 10:00 AM
thanks very much...
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.