Why this code work

  • Thread starter Thread starter a
  • Start date Start date
A

a

why this code work correctly with out ((((((End If))))))
Private Sub Command1_Click()
Dim a
Dim b
a = 5
b = 2
If a > b Then MsgBox "Hi azouz"
End Sub
thank you
 
why this code work correctly with out ((((((End If))))))
Private Sub Command1_Click()
Dim a
Dim b
a = 5
b = 2
If a > b Then MsgBox "Hi azouz"
End Sub
thank you

Because it's all on the same line.
If you had it like this:
If a > b Then
MsgBox "Hi azouz"
You would need to add an
End If
 
Back
Top