I have a macro where multiple userforms open and each have their own dedicated “Done” button which unloads the respective userforms.
Now, I have a separate Save function to copy the output sheet to a new workbook and save separately.
My intention is to call this save function when the Done button of the last userform is clicked. (User can randomly choose the order of closing the open userforms.)
I will have different cases where only one userform or 2 or even 3 different user forms open at the same time at the end of the process.
I am confused as to what logic should I use to do call save function only when the “done” button on the last user form is clicked.
How should I go about it?
THank you for your inputs.