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
HTH
Good luck