Else vs. ElseIf VBA's

Simply using IF allows you to write conditional checks. Should that condition be false, then control will pass to an ElseIf or Else clause. The number of conditions makes it is easy to know when to use which one. If you want to specify multiple conditions, use ElseIf. For example, condition1 Then ..., ElseIf condition 2, Then ... ElseIf condition3, Then ... End If. On the contrary, the Else clause only takes one condition which acts as a catch all as you cannot specify other conditions. Finally, remember that you can't add an ElseIf clause after the Else clause. Everything after the Else is taken as the final command to execute.
Back to top