Thank you for the replay Mallycat!
At first I had some trouble inserting all the right code in the right place after your suggestion.
So...
this goes to the "Sheet1(Sheet1)" code
this goes to the "ThisWorkbook" code
and
in the form, wherever changes are being made to the state of Sheet1 (hidden or unhidden).
I've spotted one small problem with this code: you were supposed to close the file to get the Boolean variable MySheetHidden to update.
In fact, if you were hiding Sheet1 and not trying to close the file, when you would unhide it, the form wouldn't pop-up. So I had to link the variable update to one more event and because of (or thanks to) the fact that when you hide a Sheet, Excel automatically selects the next Sheet, all I had to do was to add 3 lines to the "Sheet2(Sheet2)" code:
So that's the smart macro that I was looking for and right now I personally see no flaw in it.
Bookmarks