VBA Data Type
VBA Data Type
27
using the Exit For (from a For...Next loop or For Each...Next loop) or Exit Do
(from a Do While... loop). The Exit statement will normally be located within an
If statement. For example,
If CellContenkValue c= 0 Then Exit For
Use the Exit Sub or Exit Function to exit from a procedure. Again, the Exit
statement will normally be located within an If statement.
Exit statements can appear as many times as needed within a procedure.
Data Type