By hiding the menu bar when opening your workbook you are also preventing
users from doing work in other workbooks they may have open.
If you insist on running a dictator app, then my recommendation is to have / tell
users (to) open the workbook in a new instance of Excel. Any issues would then
be limited to the new instance and would go away when the new instance was closed.
Note also that the Auto_Open and Auto_Close subs do not run when a
workbook is opened via code. Only when the workbook is opened manually.
(the RunAutoMacros method can be used to force them to run)
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)
"dim"
wrote in message
Hi folks.
I have code in my auto_open macro to hide all the excel toolbars and menu
bars to give a clean dictator program appearance.
I also have included in the auto_close macro the code to re-show these menu
bars. All works fine generally....however...
......some people have been having problems with Excel 2003 if the program is
not shut-down correctly. When they start up Excel (Not my workbook program)
again, the menu bars are still hidden.
I believed that executing my program, and then exiting it again correctly
would fix this, because the auto_close macro would have the opportunity to
show the menus again, but I've been told it doesn't!
I created a basic workbook file with two buttons, one to show and one to
hide the menus. Using this seemingly works fine to retrieve the menu bars.
I've been having problems replicating this issue with Excel 2002. I've run
my program and ended Excel with the Windows Task Manager, and I've run it and
shut down my system cold with the on/off button, but the toolbars are always
there when I start back up.
Is there something about Excel 2003 that I'm missing?
Why does the auto_close macro not retrieve the hidden menu bar and toolbars
when the text of the auto_close code is the exact same as that within the
show/hide workbook?
Any advice is much appreciated. Thanks.
The code segments are as follows:
-snip-