XCESIV, here is a general macro that shows a message box with yes, no, and
cancel options, just change to fit your needs
Sub Message_box_test()
Dim Msg, Title, Response As String
Msg = "Put message here"
Title = "Put title here"
Response = MsgBox(Msg, vbYesNoCancel + vbQuestion, Title)
If Response = vbNo Then
'your code if no is clicked here
MsgBox "you clicked no"
Exit Sub ' Quit the macro
End If
If Response = vbCancel Then
'your code if Cancel is clicked here
MsgBox "You clicked cancelled"
Exit Sub ' Quit the macro
End If
'your code if Yes is clicked here
MsgBox "you clicked yes"
End Sub
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
"XCESIV" <XCESIV.278jrm_1146666301.7877@excelforum-nospam.com> wrote in
message news:XCESIV.278jrm_1146666301.7877@excelforum-nospam.com...
>
> I would like to setup the macro to confirm they want the macro to be
> performed. Can someone please help with this
>
> The macro will be assigned to a push button on the worksheet, once the
> report is complete they push the button and then i want it to create a
> pop up asking "do you wish to close this report YES/NO"
> if yes then peform close, if not do nothing.
>
> thanks
>
>
> --
> XCESIV
> ------------------------------------------------------------------------
> XCESIV's Profile:
> http://www.excelforum.com/member.php...o&userid=24271
> View this thread: http://www.excelforum.com/showthread...hreadid=538473
>
Bookmarks