View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
StargateFanFromWork[_3_] StargateFanFromWork[_3_] is offline
external usenet poster
 
Posts: 77
Default I closed all menus/toolbars with macro. Any way to fix w/o losing my XLB??

"StargateFanFromWork" wrote in message
...
Ah, guys, I did something really silly this morning. I found code in a

msg
in the archives that was really neat but it didn't discriminate between
valid toolbars and the ones that might remain inadvertently open and for
which I'd need to close. I won't go into the whys/wherefores only that I
clicked on the icon I'd used the assign the macro to as it was in a
depressed state. It was silly, I know <g. And it was like magic. Now

you
see 'em / now you don't! <g I no longer have any menus and toolbars. I
only have a formula bar under the title bar and the column/row indicators.

Of course, renaming my xlb files gets me back to a mode with toolbars that
are factory default ones, but I'd like to salvage my xlb file if possible.
Without the pulldowns, as well as my regular toolbars, is there a way

around
this problem?

<g I hadn't done anything silly like this in quite a while, so I guess I
was due. Thanks for any help in helping me get out of the corner I've
painted myself into. :oD


Well, sorry for this. I kept fighting with this and it looks like I found
the answer myself. Wish I'd not posted this earlier msg but it looked like
I wouldn't be able to get my xlb back. Fortunately, in mulling this over
during the lunch hour (I posted this msg just after lunch) and just now
fighting with this, I stumbled upon a possible solution that did indeed
work. First off, was able to find the original archive post where I'd
gotten the code from. The code is this:

Dim bar As CommandBar
For Each bar In CommandBars
bar.Enabled = False
Next


Fortunately for me, I saw that although my xlb file was affected and that's
what I couldn't access, my PERSONAL.XLS file was still the original one even
though I renamed my xlb. So with default toolbars rather than my own, I
tried to see if using the reverse of the above code would work. A hint in
another post in the archives led me to the idea of writing the code into an
Auto_Open in my personal.xls with the code for the above except with the
bar.Enabled line as true rather than false, or: "bar.enabled = True". I
deleted the new xlb file and renamed my old one back and the next time I
opened Excel, I got my lovely custom toolbars back!! <g I've now gotten
rid of all these toolbars codes from my personal.xls so this will _not_
happen ever again! <g This time, I will go to the group to find an answer
to the orphan open floating toolbars I may have in future. I guess I'm
still too green to figure it out on my own, archives or no archives!!!! <g

What is really neat and promising is that maybe I'm finally starting to get
somewhere. I painted myself into a corner but I was able to get myself out
of it!!! That's awesome for me. There's hope yet. <g

Thanks for "listening". Have a great day. :oD