redim

Hi,

Please kindly assist how can we increment allocation of X coodinate?

i.e.

Dim Arr_O(0, 4) As Integer
ReDim Preserve Arr_O(increament by 1, no change)


ReDim Preserve Arr_O(UBound(?)+1, no change)

Thanks
RyanBankAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

EDDYKTCommented:
you cannot, you can only redim the last dimension of a dynamic array
Guy Hengel [angelIII / a3]Billing EngineerCommented:
I agree with EDDYKT
RyanBankAuthor Commented:
EDDYKT,

would you happen to know how we can redim the last diremtion? using the last value.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

RyanBankAuthor Commented:
Dim Arr_O(4, 0) As Integer
ReDim Preserve Arr_O( no change,increament by 1)


ReDim Preserve Arr_O(no change,UBound(?)+1)
Guy Hengel [angelIII / a3]Billing EngineerCommented:


ReDim Preserve Arr_O(lbound(arr_o,0) to ubound(arr_o,0), lbound(arr_o,1) to UBound(arr_o,1) + 1)
EDDYKTCommented:
You can reverse your array looks like

ie


Dim Arr_O(0, 4) As Integer

to

Dim Arr_O

ReDim Arr_O(4, 0)

ReDim Preserve Arr_O(4, 2)
ReDim Preserve Arr_O(4, UBound(Arr_O, 2) + 1)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RyanBankAuthor Commented:
EDDYKT,

if we didn't know the last value of the last dimension, how can we pull it up?
RyanBankAuthor Commented:
ReDim Preserve Arr_O(4, Ubound(?) +1)   what will the ? be
Guy Hengel [angelIII / a3]Billing EngineerCommented:
please check my comment above
RyanBankAuthor Commented:
error returned: array laready dimentioned.
RyanBankAuthor Commented:
got it using EDDYKT's solution.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.