MsgBox "Save current game?", vbYesNo, "Save", 0, 0
I have a problem, I make a Yes/No message box and no matter what I answer the same thing happens:
MsgBox "Save current game?", vbYesNo, "Save", 0, 0
If vbYes Then frmSave.Show
If vbNo Then End
No matter what answer I choose the program ends. What is wrong here?
You are basically checking for the VBYes VBNo values, whihc you should not. You should store the result of the value returned by the message box then chekc if it is VBYes then show the form or end the program
The solution would be
dim i as integer
if VBYes=MsgBox("Save current game?", vbYesNo, "Save", 0, 0)Then
frmSave.Show
Else
End
End If