Home » VB 6.0 Tutorial » VB 6 For Loop

VB 6 For Loop

The For loop is another simple loop structure, which is different from other loops like Do loop and While Loop because it specifies a range before the loop could start.

The syntax for the For loop is given below.

For index = start To end [Step step]
  [Statements]
Exit For
  [Statements]
Next index

Let us discuss the For loop structure.

For – keyword indicating the type of loop structure.

index – a variable that acts as index for the loop.

start To end – values that indicates start of the loop and end of the loop

Step step – The integer value that indicate how much to increment the loop at each iteration. Default is 1.

(adsbygoogle = window.adsbygoogle || []).push({}); </script

Please support us by disabling your adblocker or whitelist this site from your adblocker. Thanks!

turn of adblocker imag

(adsbygoogle = window.adsbygoogle || []).push({});