06-19-2024, 10:01 PM
yeah, don't think redim _preserve works like that
here is sure way
here is sure way
Code: (Select All)
Dim Grid2(1 To 5, 1 To 5)
' LoadInitialValues
For y = 1 To 5
For x = 1 To 5
counter = counter + 1
Grid2(x, y) = counter
Next
Next
ShowArrayValues Grid2()
ReDim Shared Grid(1 To 10, 1 To 10)
For y = 1 To 5
For x = 1 To 5
Grid(x, y) = Grid2(x, y)
Next
Next
ShowArrayValues Grid()
End
Sub ShowArrayValues (arr())
Print "Array Values:": Print
For y = 1 To UBound(arr, 2)
Print Using "Row ## "; y,
For x = 1 To UBound(arr, 1)
Print Using " ##"; arr(x, y);
Next
Print
Next
Print
End Sub
b = b + ...