Control flow keyword summary

Action Keywords
Branch GoSub...Return, GoTo, On Error, On...GoSub, On...GoTo
Exit or pause the program DoEvents, End, Exit, Stop
Loop Do...Loop, For...Next, For Each...Next, While...Wend, With
Make decisions Choose, If...Then...Else, Select Case, Switch
Use procedures Call, Function, Property Get, Property Let, Property Set, Sub

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.