Morning all,
I have several large codes which run reports that are all run through a user form. Each button calls a different proceedure. One of these proceedures opens up a raw data sheet and fills in some blank cells. If any cells can't be filled in it throws up a message box to alert the user that some data needs to be added manually.
What I'm after is a message box to appear with this alert, and allow the user to either cancel the macro, edit the data necessary and re-run the macro from th beginnng (by clicking the user form button again), or 'suspend' the macro, make the edits, and click a button to continue the macro from where it left off.
After doing a lot of hunting round, I've found I can't do this from a message box as it won't let you edit a worksheet while the message box is visible, and using a user form is the better way. I've created a second userform for this scenario - simple text with two buttons - Continue and Cancel.
I can get the code to display this second userform when it finds any relevant cells, but what I'm struggling with is how to code the Continue button to jump back into the code within the first userform and resume from just after the form was called in the first place.....
Below is the snippet of code I have already tried with the messagebox function. The user form I'm trying to call is called 'NoData', and all the code is contained within the first userform code module.
Bookmarks