Re: Help on array variables
From: George Inacio (jginacio_at_hotmail.com)
Date: 10/01/04
- Next message: George Inacio: "Re: How to find how many pages going to be"
- Previous message: Bob Butler: "Re: Transparent form, opaque label"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 2 Oct 2004 00:24:42 +0200
Yes it is all there on MSDN but was confuse to me
but after your example became more clear to me.
Thanks for your help.
Regards,
George
"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message
news:%23jKeWqkpEHA.2696@TK2MSFTNGP15.phx.gbl...
> George Inacio wrote:
> > Hello Everyone.
> >
> > I have data to place on lot a string variable and I am
> > using an array variable with unknown elements.
> >
> > The array variable is declare as Private on the Form General
declarations
> > so all subs on the same Form can access it.
> >
> > How I do assign the quantity of elements to that
> > Array String Variable.
>
> Assuming you have something like....
>
> Private MyArray() As String 'in the declarations section,
>
> you can...
>
> ReDim MyArray(24) if you need 25 elements (0 based)
>
> to expand an existing array without losing data, you can...
>
> ReDim Preserve MyArray(99) 'to expand it to 100 elements without losing
> the first 25
>
> To test its current size, use....
>
> NumElements = UBound(MyArray) + 1 'if it's zero based.
>
> > If possible an example will be very much appreciated.
> >
> > Thanks in advance!
> >
> > Regards,
> > George
> >
> >
>
> --
> Ken Halter - MS-MVP-VB - http://www.vbsight.com
> Please keep all discussions in the groups..
- Next message: George Inacio: "Re: How to find how many pages going to be"
- Previous message: Bob Butler: "Re: Transparent form, opaque label"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|