Several years ago, I designed an macro-laden Excel file for my work section. I then created a "toolkit" workbook with multiple macros to enable the users to fix these files, rather than piling them up in my lap. %-/
The macro I'm currently working on requires the user to close all Excel files (except the toolkit) before the macro continues. Unfortunately, I can't guarantee that will be done prior to initiating the macro. So I thought to open a UserForm with instructions to close all other workbooks, then click a button on the form when this is accomplished. I'm using a form because that would allow the users to interact with the other XL files, whereas a Message Box would not. I also need to include a Cancel button in case they are not ready to close a certain file.
My problem: I am drawing a blank on how to detect when and which form button is clicked to allow the rest of the macro to continue to run. Everything I can think of seems very convoluted -- which tells me I've got the wrong answer! If someone could drop-kick me in the right direction, I would be very grateful.
The macro I'm currently working on requires the user to close all Excel files (except the toolkit) before the macro continues. Unfortunately, I can't guarantee that will be done prior to initiating the macro. So I thought to open a UserForm with instructions to close all other workbooks, then click a button on the form when this is accomplished. I'm using a form because that would allow the users to interact with the other XL files, whereas a Message Box would not. I also need to include a Cancel button in case they are not ready to close a certain file.
My problem: I am drawing a blank on how to detect when and which form button is clicked to allow the rest of the macro to continue to run. Everything I can think of seems very convoluted -- which tells me I've got the wrong answer! If someone could drop-kick me in the right direction, I would be very grateful.