|
Dim myArray( ), nDims, iSelection
iSelection = vbYes
Do While iSelection <> vbCancel
iSelection = MsgBox("Create 2 dimension array?", _
vbQuestion Or vbYesNoCancel, "Dynamic Arrays")
If iSelection = vbYes Then
ReDim myArray(10,5)
nDims = 2
ElseIf iSelection = vbNo Then
ReDim myArray(4,10,2)
nDims = 3
End If
If iSelection <> vbCancel Then
MsgBox "The upper bound of dimension " & nDims & _
" is " & UBound(myArray, nDims)
End If
Loop
|
|