Dim dr As DataRow
Dim dt As DataTable
dt = DataSetName.Tables(0)
For Each dr In dt.Rows
something = dr("FeildName")
Next
Showing posts with label For Loop. Show all posts
Showing posts with label For Loop. Show all posts
Monday, April 18, 2011
Wednesday, October 27, 2010
The For loop
The For loop is used when the number of repetitions is known. It uses a single variable to start the loop, and indicates how many times the loop needs to execute.
Next
The loop counter variable in this instance is intCount. It begins at 0. Each pass of the loop causes the loop counter to increment +1. The loop will execute 6 time - from 0 to 6.
For intCount = 0 To 5
msgbox("This is loop number " & intCount)
The loop counter variable in this instance is intCount. It begins at 0. Each pass of the loop causes the loop counter to increment +1. The loop will execute 6 time - from 0 to 6.
Subscribe to:
Posts (Atom)