Dim bAnswer
bAnswer = MsgBox ("Are you sure you want to do this?", vbYesNo + vbQuestion + vbDefaultButton1, "Leave me now?") 'yes/no buttons with question mark icon and default button of yes
If bAnswer = vbYes Then
window.open or whatever
End If