My code is like this
just for example only:
vb Code:
strRightAnswer = "2" strAnswer = InputBox("1+1 = ?", "") If strAnswer = strRightAnswer Then MsgBox "Your Answer is Correct!", vbInformation ElseIf Trim(strAnswer) = "" Then MsgBox "You don't have an answer!", vbInformation Else MsgBox "Your Answer is Wrong!", vbInformation End If If Trim(strAnswer) = "" Then z = MsgBox("Are You Sure you want to skip this question?", vbInformation + vbOKCancel, "") End If
The code works fine I think, but I need a help.
When the user types an answer to the text field, it will be stored in the strAnswer variable?
So when the user didn't type any answer or presses the cancel button in the InputBox in the Statement Line 2, it to go directly to the Statement Line 11 and Line 12
I need a little help in there, so that when the user click the cancel button, it will then re-prompt again the same question.
Help! Thanks!




Reply With Quote