Write If Then statement in one line
Sub SimpleIfThen2() Dim weeks As String On Error GoTo VeryEnd weeks = InputBox("How many weeks are in a year:", "Quiz") If weeks <> 52 Then MsgBox "Try Again": SimpleIfThen2 If weeks = 52 Then MsgBox "Congratulations!" VeryEnd: End Sub