15-For Loop

0
485

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.

[vb] For [counter variable] as [datatype] = [start #] to [end #] statements…..
nex [counter variable] [/vb]

 

example:

[vb] For i As Integer = 1 To 10
i = +i
MsgBox(i)
Next i

[/vb]

 

 

Readers might read also:

 

 

 

Facebook Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.