|
-
Jan 19th, 2006, 02:35 PM
#1
Thread Starter
Frenzied Member
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.
-
Jan 19th, 2006, 02:56 PM
#2
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"?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 19th, 2006, 03:00 PM
#3
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 19th, 2006, 04:31 PM
#4
Thread Starter
Frenzied Member
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
Last edited by angelica; Jan 19th, 2006 at 04:40 PM.
-
Jan 19th, 2006, 04:53 PM
#5
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?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 20th, 2006, 03:07 AM
#6
Thread Starter
Frenzied Member
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
Last edited by angelica; Jan 20th, 2006 at 03:12 AM.
-
Jan 20th, 2006, 06:34 AM
#7
Thread Starter
Frenzied Member
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.
-
Jan 20th, 2006, 07:53 AM
#8
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 20th, 2006, 11:04 AM
#9
Thread Starter
Frenzied Member
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.
-
Jan 20th, 2006, 11:10 AM
#10
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|