Cannot disable Worksheet Menu Bar in Excel
Hi Guys,
Below is my code for disabling Worksheet Menu Bar. I need to have the grids and Column Header and Row numbering ONLY. all toolbars can be set to invisible but not this one. any one knows why and how to do it??
VB Code:
xlApp.CommandBars("Worksheet Menu bar").Visible = False
thanks for any help I may get.
Re: Cannot disable Worksheet Menu Bar in Excel
Are you getting an error msg or ?
Can you do it manually from the context menu "Customise"?
Re: Cannot disable Worksheet Menu Bar in Excel
I get "Method visible failed" upon opening of the workbook since you can do it from vba ide.
Seems you can do it from the customize dialog though.
Re: Cannot disable Worksheet Menu Bar in Excel
Hi ,
It seems I cant do it neither from the Toolbars customize neither from vba with the code below.
Private Sub Workbook_Open()
Application.CommandBars("Worksheet menu Bar").Visible = False
End Sub
ther error now is
method 'Visible' of object 'Commandbar' failed
Re: Cannot disable Worksheet Menu Bar in Excel
Yes, thats the same error I got but I was still able to do it from the Tools > Customize menu. Maybe you need a Office Update or a Repair? What version are you running?
Re: Cannot disable Worksheet Menu Bar in Excel
hi
Ive go Office 2003. Yes the Tools > Customize lets you uncheck the Worksheet Menu Bar but then in the same dialog when you click Close button the toolbar comes back . Is it with my version only. Please help. thanks
Re: Cannot disable Worksheet Menu Bar in Excel
hi,
I have finally disabled the Worksheet Menu Bar and also the user ability to customize the toolbars.
But now Im faced with even greater trouble. All my Excel file toolbars now have the toolbars disabled and nothing showing (except what th visual basic) which I did code). I have removed my code but i still cant get it back.
Hi any Big idea what Ive done and how I can get it back apart from installing it again.
Re: Cannot disable Worksheet Menu Bar in Excel
There is a .Reset method on each toolbar. If you execute it it will reset the toolbar back to its OEM settings.
Re: Cannot disable Worksheet Menu Bar in Excel
hi RobDog888,
You are always great!. Will try it out when I get back home. thanks. Get back to you.
Re: Cannot disable Worksheet Menu Bar in Excel
Thanks! :) I also think that the "Help > Detect and Repair" may also do the same but I cant remember the results from the last time I did one. It may be worth a try.