Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to pause an Excel macro

Status
Not open for further replies.

4281967

MIS
Oct 14, 2005
74
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top