multi dim array vba code example
Example 1: vba multiple dim
Dim a, b As Integer
Dim a As Variant, b As Integer
Dim a As Integer
Dim b As Integer
Dim a As Integer, b As Integer
Example 2: vba multidimensional array
Sub CreatingArrays()
Dim arrVar(0 to 3, 0 to 5) As Variant
Dim strArr(3,5) As String
Dim i As Integer
Dim j As Integer
Dim intCount as Integer
For i = LBound(arrVar) To UBound(arrVar)
For j = LBound(arrVar, 2) To UBound(arrVar, 2)
arrVar(i, j) = intCount
arrStr(i, j) = "X, Y: " & i & ", " & j
intCount = intCount + 1
Next j
Next i
End Sub