Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Hide Menu Bar in Excel

Status
Not open for further replies.

WYokeCheng

Programmer
Dec 11, 2002
7
US
I hv posted a thread before on this, the reply works for Excel ToolBars, but I need also to hide the Excel "Menu Bar" using VB codes (i.e. the File, Edit, Format,....Help) ? My users are only allow to close the Excel application and then return to my program and nothing else. I need to prevent them from doing Save or SaveAs on their own in Excel; these functions will be handled in my VB program.

Any idea? Or can I add in Excel as an object in my VB program instead of running the Excel in a separate instance.
If Yes, HOW ?

Thanks.
 
AFAIK, the only way to hide menu bar is to replace it by creation of new menu (using office object model) and make it visible. This will replace standard menu.
However, this will not solve your problem. Excel user can use shortcuts to perform some actions, including saving the workbook. So you should also trap and disable such events. Additionally, you should also hide toolbars, which need to be finally restored to avoid mess.
If you are sure MS office is installed, you can use office web components, with spreadsheet as one of them. Better option is office XP (version 10), due to better design and less bugs (for instance in version 9 with office 2000 one could not disable mouse click event).
 
have you concidered using access instead of excel

you can use menu = 0 in a form and all menu items go away
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top