Why is this IF-THEN line working without an END IF?
excel, if-statement, vba
Solution
You don't need `End If` if there is only one statement enclosed in the `If` and it is on the same line as the `If` statement.
Problem
I've a question about If command. ``` For x = 2 To 8 If ComboBox1.ListCount < 7 Then ComboBox1.AddItem Cells(x, 13).Value Next x' ``` Why does this work without errors? There is no End if statement. I don't know if it matters, but this code is in the UserForm_Activate() procedure. Thanks for the help.