Hello,
Does anyone know if it is possible to completely remove the Worksheet Menu bar from an Excel spreadsheet using VBA code?
Thanks
Hello,
Does anyone know if it is possible to completely remove the Worksheet Menu bar from an Excel spreadsheet using VBA code?
Thanks
Yes
[VBA]Sub disableWorksheetMenu()
Application.CommandBars(1).Enabled = False
End Sub
[/VBA]
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.
..
[vba]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[/vba]
Edit: Doh! Too slow for Gibbs again! LOL!
Regards, Zack Barresse
Check out the KB! :|: BOARD TAGS: WHAT ARE THEY AND HOW DO I USE THEM
What is a Microsoft MVP? | Free Microsoft Courses | My Book on Excel Tables
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.Originally Posted by firefytr
I considered the word "removed" as "deleted", hence my post, but I see your point.
Regards, Zack Barresse
Check out the KB! :|: BOARD TAGS: WHAT ARE THEY AND HOW DO I USE THEM
What is a Microsoft MVP? | Free Microsoft Courses | My Book on Excel Tables
thanks very much...