Basics of VB Programming
The For..Next statement is an easy way to control program flow. e.g.
Dim i As Integer Dim iValue As Integer For i=0 To 10 iValue=0+1 Next i
In this situation iValue will equal 0 at the start and will increase by 1 every time until it reaches 10.
This can be used to process items from a list box. e.g.
Dim i As Integer For i=0 To List1.ListCount List2.AddItem List1.List(i) Next i
This code copies all the list items from List1 to List2.
Page 4 of 6