I'm learning Excel VBA Programming for Dummies, 3rd Edition. There's an example which uses nested For-Next loops to initialize a three-dimensional array with the value of 100.
I want to see this sub procedure's result.
Sub NestedLoops()
Dim MyArray(10, 10, 10)
Dim i As Integer
Dim j As Integer
Dim k As Integer
For i = 1 To 10
For j = 1 To 10
For k = 1 To 10
MyArray(i, j, k) = 100
Next k
Next j
Next i
End Sub
I tried using a MsgBox to display MyArray, but it says Type mismatch. Is there a way to show the array?