Can someone tell me how to hide the worksheet menu bar.
I've tried this code:
VB Code:
application.commandbars("Worksheet menu Bars").Visible = False
but:ehh:, it doesn't work. Can someone help me:confused: please?!!?
Thanks in advance,
Greyskull
Printable View
Can someone tell me how to hide the worksheet menu bar.
I've tried this code:
VB Code:
application.commandbars("Worksheet menu Bars").Visible = False
but:ehh:, it doesn't work. Can someone help me:confused: please?!!?
Thanks in advance,
Greyskull
Something like this (untested) at your own risk (grin) :-
'---------------------------------------
Sub untested()
For Each b In Application.CommandBars
b.Visible = False
Next
End Sub
'---------------------------------------
I've already done this by having this code
VB Code:
Sub OK() For Each onebar In Application.CommandBars onebar.Visible = False Next End Sub
But it still doesn't remove it.
Thanx anyways
Here is what you are looking for:
Same question asked just last week - try searching the archives before you post.
[Highlight=VB]
Dim Bar As CommandBar
For Each Bar In Application.CommandBars
Bar.Enabled = False
Next
[\vbcode]
try reading the post before condeming it fiddler.
The code you've posted doesn't actually work - it seems to be office XP that causes it problems as that code does work with excel prior to that.
I'm runing office xp with windows xp pro and that code hasn't worked for me since I upgraded.
- update -
my bad, just added sp3 for office xp and the code works?
Works for me in Excel 97, and Excel XP (using sp-2)
It's about using the .enabled property and not the .visible property.
I was having a long day yesterday - didn't mean to be spitefull. And I did post the same thing just last week.