Is there any way to "pause" a macro?
I have a macro that imports a datasheet and then begins to shred it into several reports - and eventually mails them. I would like to be able to pause execution of the macro after the datasheet is imported, so the user could verify the data before the macro bangs out and mails the reports.
I thought at first I could use a msgbox with a vbYesNo - but that is modal.
I guess I could break this into two parts: run macro #1 to import - then run macro #2 to make and send - but I am trying to keep this as simple as possible.
Here's one thing I thought of:
Have macro #1 import the datasheet, and then have it (macro #1) open a userform that would have a button on it that would run macro #2. If you think that would work, how can I have a macro open a userform?
I tried something like this without using a userform - by having the marco create a button on a worksheet that would call "macro #2" but I could not figure out how to have VBA put the code I needed
Application.Run("PERSONAL.XLS!RunReport")
Can anyone suggest a better way?
Thanks,
Patrick
I have a macro that imports a datasheet and then begins to shred it into several reports - and eventually mails them. I would like to be able to pause execution of the macro after the datasheet is imported, so the user could verify the data before the macro bangs out and mails the reports.
I thought at first I could use a msgbox with a vbYesNo - but that is modal.
I guess I could break this into two parts: run macro #1 to import - then run macro #2 to make and send - but I am trying to keep this as simple as possible.
Here's one thing I thought of:
Have macro #1 import the datasheet, and then have it (macro #1) open a userform that would have a button on it that would run macro #2. If you think that would work, how can I have a macro open a userform?
I tried something like this without using a userform - by having the marco create a button on a worksheet that would call "macro #2" but I could not figure out how to have VBA put the code I needed
Application.Run("PERSONAL.XLS!RunReport")
Can anyone suggest a better way?
Thanks,
Patrick