for loob visual basic code example
Example 1: for loop vb.net
For counter [ As datatype ] = start To end [ Step step ]
[ statements ]
[ Continue For ]
[ statements ]
[ Exit For ]
[ statements ]
Next [ counter ]
Example 2: visual basic for loop
Dim iTotalPrints As Integer
iTotalPrints = 5
For iCount = 1 To iTotalPrints
MsgBox Prompt:=iCount, Title:="Method: Fundamental"
Next
Dim sTextList(4) As String
sTextList(0) = "aaa"
sTextList(1) = "bbb"
sTextList(2) = "ccc"
sTextList(3) = "ddd"
sTextList(4) = "eee"
For Each sSeparateText In sTextList
MsgBox Prompt:=sSeparateText, Title:="Method: Within an Array"
Next