A couple of hints that may prove helpful to you with this also, since you're
working with custom menus.
When the workbook Opens, not only does its _Open() event fire, but so does
its _Activate() event. Likewise, when it is closed, both the _BeforeClose()
and _Deactivate() events fire off.
When working with custom menus in a workbook, I usually put my "create
custom menus" code into the Workbook_Activate() event code, and the "destroy
custom menus" code into the Workbook_Deactivate() event. This way, if a
person has multiple workbooks open, as they switch between them, they don't
have the (inappropriate) custom menu available in another workbook. But as
soon as they choose the book with the needed custom menu again, it will
reappear in that book -- which it wouldn't do if only controlled by _Open()
and _BeforeClose().
"SteAXA" wrote:
> Great! It's really my solution! Now i can improve my application.
> Thanks!
|