Hi,
you don't really need a macro for this.
You could try the following code on whatever form event you want to use:
Select Case MsgBox("Your Message Text", vbYesNo Or vbExclamation Or
vbDefaultButton1, Application.Name)
Case vbYes
'yes was clicked so do something
Case vbNo
'no was clicked so do something else
End Select
Or if you want to stick to an if then statement:
If Msgbox("Your Message Text",vbYesNo,"Your Title") = vbYes Then
'yes was clicked so do something
End If
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.