Arrays in VB


An array is a consecutive group of memory locations that all have the same name and the same type. To refer to a particular location or element in the array, we specify the array name and the array element position number. The Individual elements of an array are identified using an index. Arrays have upper and lower bounds and the elements have to lie within those bounds.
Each index number in an array is allocated individual memory space and therefore users must evade declaring arrays of larger size than required. We can declare an array of any of the basic data types including variant, user-defined types and object variables. The individual elements of an array are all of the same data type.

Loops in Visual Basic


A Loop (repetition structure) allows the programmer to that an action is to be repeated until given condition is true.
Do While.........Loop

The Do While...Loop is used to execute statements until a certain condition is met. The following Do Loop counts from 1 to 100.

Dim number As Integer
    number = 1
Do While number <= 100
   number = number + 1
Loop

A variable number is initialized to 1 and then the Do While Loop starts. First, the condition is tested; if condition is True, then the statements are executed. When it gets to the Loop it goes back to the Do and tests condition again. LEARN MORE>>>>>>