Why this code work

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
 
F

fredg

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top