Types of Loops in VBA

Loops are used to repeat actions.

Do While–Loop – Examines if the condition is true before performing action. It would continue to loop while the condition is true.

Do-Loop While – Examines if the condition is true after performing action. It would perform the action at least once.

Do Until-Loop - Examines if the condition is false before performing action. It would continue to loop while the condition is false.

Do-Loop Until - Examines if the condition is false after performing action. It would continue to loop while the condition is false. It would perform the action at least once.

For-To-Next – Used for the finite looping. The loop will work from start value to end value by incrementing values.

For Each-Next – Used for performing actions for each item in a group or range.

Related Posts

Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email will not be published. Required fields are marked *

*
*