Dave,
I found a solution but first I should explain a little bit more about
the problem...
I have a suite of 14 calculation wrkbks with a menu wrkbk containing a
userform and data that is shared by the 14 wrkbks.
The different menu options open 1 - 4 of the calculation wrkbks
depending on whcih calcualtions are required.
There was code to return to the menu in each wrkbk (but not actually
close any of the calcualtion wrkbks). The idea being that when the user
picks his next option from the menu it would then close the calculation
wrkbks it no longer needed and open any new wrkbks it did need (some of
the calculation wrkbks used more often than others and I didnt want it
closing wrkbks only to reopen them a few seconds later)
The problem was that if the calculation wrkbk that opened the menu was
closed the code stopped running abruptly.
Your solution would work for some cases but if it was one of the more
common calc wrkbks or if the user needed to do the same calc twice in a
row it would bring up the menu open and close all the required calc
wrkbks and then return to the origanal and promptly close a wrkbk it
had just opened
The solution was to take the code for returning to the menu out of the
calc wrkbks and into a userform and show that form modeless on top of
the calculation books. Not only does this solve my problem but it means
that all my code is in one wrkbk which will make for easier maintenance
in the future
Hope this makes sense!
Simon