I want to add some to a macro have which asks before performing the rest of the macro... "Are all details correct?" with a yes and no button. yes, carries on with the macro and no ends the macro.
Any advice on how best to do this?
Thanks.
I want to add some to a macro have which asks before performing the rest of the macro... "Are all details correct?" with a yes and no button. yes, carries on with the macro and no ends the macro.
Any advice on how best to do this?
Thanks.
Last edited by adam2308; 04-12-2009 at 02:55 PM.
Hello adam2308,
![]()
Sub Macro1() Dim Answer As Integer 'Your macro code Answer = MsgBox("Are all the details correct?", vbInformation + vbYesNo) If Answer = vbNo Then Exit Sub 'Your macro code continues here End Sub
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
thank you!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks