Mega Code Archive

 
Categories / VisualBasic Script / Data Type
 

Declaring and Working with Fixed Arrays

Sub FixedArray()     Dim astrNames(5) As String     Dim intCounter As Integer     astrNames(0) = "A"     astrNames(1) = "B"     astrNames(2) = "C"     astrNames(3) = "Z"     'Use a For...Next loop to loop through the elements of the array     For intCounter = 0 To UBound(astrNames)         Debug.Print astrNames(intCounter)     Next intCounter End Sub