Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dears;
I have a problem with a "For", the code is similar to this one: for x = 1 to UBound(Array()) IF "some conditions" then Redim Preserve Array(UBound(Arrray())-1) x = x-1 end if next x For example supose the array [10,3]. The conditions make reference to the current array postion for x = 1 supose the conditions are accomplished and the array would become: [10] and x will be x = 0. Next x is x = 1. Now the conditions are not accomplised, so the array continues being [10] and next x = 2. The problem is that for X = 2, goes once more inside the loop but the UBound of array is 1, so now we are out of range! How can I solve this? Thanks to all -- atrep |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Array values with UBound | Excel Programming | |||
Array Ubound | Excel Programming | |||
UBound of multi-dimensional array? | Excel Programming | |||
Handling ubound on an uninitialised array | Excel Programming |