Mega Code Archive

 
Categories / VisualBasic Script / Language Basics
 

Using the Multi-Line If Then Statement

Sub SimpleIfThen3()     Dim weeks As String     Dim response As String     weeks = InputBox("How many weeks are in a year?", "Quiz")     If weeks <> 52 Then         MsgBox "The correct answer is 52.", response = MsgBox("Would you like to try again?", _         vbYesNo + vbInformation + vbDefaultButton1, "Continue Quiz?")         If response = vbYes Then             Call SimpleIfThen3         End If     End If End Sub