15-For Loop

0
314

This Visual Basic Tutorial is all about For Loop.
The For Loop repeats a group of statements in a specified number of times while a loop index counts the number of loop iterations as the loop performs.

 

This is the syntax in constructing a loop.

  1. For [counter variable] as [datatype] = [start #] to [end #]
  2. statements.....
  3. nex [counter variable]

 

example:

  1. For i As Integer = 1 To 10
  2. i = +i
  3. MsgBox(i)
  4. Next i

 

 

Readers might read also:

 

 

 

Facebook Comments
(Visited 23 times, 1 visits today)

LEAVE A REPLY

Please enter your comment!
Please enter your name here