How to keep custom menu from being killed until all wkbk copys
I never would have thought of that at all! I think, though, that I'd have to
send the add-in to all of the users (there are a lot, some of them outside
the company), along with directions on how to install it and what it does.
Given some of the departments and users involved, I'm pretty sure there would
be a lot of handwringing and panic (and one of our departments runs on Macs,
which always screws things up).
Thanks so much for the idea, but I really think that whatever "fix" I can do
has to be self-contained within the workbook. Probably I'm screwed.
"Bernie Deitrick" wrote:
Hapless,
Put the code into an add-in and install the add-in using Tools / Add
Ins..... Then use code to set the commandbar to be visible in the
workbook's activate event, and set visible to false in the de-activate
event.
HTH,
Bernie
MS Excel MVP
"Hapless" wrote in message
...
We use an overly complicated workbook for creating production schedules. A
user grabs a blank version from our network and then uses it to build
whatever schedule he or she needs. They might do this dozens of times to
build schedules for different projects. Furthermore, users might have
multiple schedule workbooks open at the same time, all of them identical
except for the data they contain.
The workbook uses a Workbook_Open event to create some custom menus and a
BeforeClose event to kill the menu. Unfortunately, it seems somewhat
volatile
if you have more than one of the workbooks open at the same time, causing
random crashes. Further, since the BeforeClose event kills the custom
menu,
you lose it even if you still have other copies of the workbook open,
forcing
a user to close and reopen a workbook to get it back.
I guess my question is this: How can I keep the custom menu available
until
the last open copy of the workbook is closed? And since the workbooks are
all
identical (identical named ranges, code, etc.), is there a way to minimize
the volaltility I've described? I kind of wonder if, when a user clicks
from
one workbook window to another, that somehow the identical code, named
ranges, etc. are getting tangled up somehow. Frankly, much of this code
has
been cobbled together from different sources over a long period of
time--which is kind of different from actually knowing what I'm doing. Any
help would be much appreciated!
|