Public Function Prompt(ByVal message As String, Optional ByVal title As String = "MyApp") As VbMsgBoxResult
Prompt = MsgBox(message, vbYesNo, title)
End Function
And then with proper locals, your condition becomes:
If Prompt(message, title) = vbYes Then