Checking how an array was Dimmed....

Just starting out? Need help? Post your questions and find answers here.
Arcee_uk
User
User
Posts: 29
Joined: Fri Jul 25, 2008 6:09 am
Location: England

Checking how an array was Dimmed....

Post by Arcee_uk »

If I Dim an array to say 34 elements how I can get my program to check what that array was dimmed to, I.e the maximum elements available?

E.g I use the command:

Code: Select all

Dim Arrary.l(45)
My program needs to redim this array by 6 to make it larger, but doesn't know how big the array was. So it needs to check and see, then add 6 to the answer and ReDim it ready for use.

I know I could store the figure the array was dimmed to, but I just wondered if there is a command that will find out for me which I could use locally within a procedure rather than globalising another variable to hold the number.

I cannot see a command in the user guide that does this (unless I am blind which is possible) and nor can I see an answer on here when I searched for it.

If anyone can tell me how you do it (or point me to a post I missed) I would be very greatfull.

Thanks all.

Arcee.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

oh... and have a nice day.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

Post Reply