I am writing a vbscript running under WSH which starts Excel and
writes some stuff into some cells. This all works just fine. I am
using Excel as an output window for the script because it is easy to
do and its easy to format the data. However, there is no need to
display the toolbars, formula bar, and status bar in my Excel output
window. I am able to turn these off with vbscript code.
Here is my problem. When Excel terminates, by the user clicking the
red X to close the window, Excel remembers that the toolbars, formula
bar, and status bar were not visible. The next time the user launches
Excel to do his own thing, all he sees is the menu bar. He must
manually make the other bars visible again.
I have not been able to come up with a solution to this problem. If
vbscript could sit in a loop waiting for the user to close the Excel
window that the script created, I could then open another hidden Excel
window and reset the visibility of the hidden bars. However, I cannot
figure out how to detect when the Excel window is closed.
Creating a VBA Excel macro to reset the visibility of the bars is not
practical since my script will be distributed to a large number of
users and I don't want to mess with that sort of thing. The solution
must be contained within the vbscript program.
Any suggestions as to how I can restore the visibility of the hidden
bars would be appreciated.
By the way, is there a way to turn off the menu bar as well? I really
don't need that either.