Evaluate Open Files / multiple instances open
You could put an exception type If ... Then statement in like if the open
sheets are < 2 then do the reset command. That way if more than one sheet is
open it won't reset.
"Troubled User" wrote:
I have a custom menu bar that gets activated when the file is open and gets
reset when the file is closed. Problem is the user is now telling me they
may have multiple instances of the same file open at one time.
I altered the Add code to reset before adding, so that only one set of the
menubar was open. This seems to work fine, problem is on the close event I
need to evaluate if multiple sheets (of this type) are open and then skip the
Reset (Application.CommandBars(1).Reset) on the close, if it is not the last
sheet of this kind open. Any ideas?
|