Re: Help on array variables

From: George Inacio (jginacio_at_hotmail.com)
Date: 10/01/04


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..



Relevant Pages

  • Re: New riddle
    ... is it possible to send me ur source code that gives u 16 answers? ... > The main problem here may be to assure that there are 5 houses, ... > sensible rearranging of declarations. ... > Best regards, Verena ...
    (comp.lang.prolog)
  • Re: Multiple instances of a form that has a subform
    ... please read the sample code again from the link I posted. ... > You will see that the form variable is declared in the 'Declarations' section ... > therefore it stays in scope after the sub or function executes. ... >> Regards. ...
    (microsoft.public.access.forms)
  • RE: DataGrid
    ... just make sure that their declarations ... "NewBie" wrote: ... >> Regards, ... >> Rakesh Rajan ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Does Vector is not supported by VC++ 6.0??
    ... Most likely you have an error in one of the header files or ... declarations you are including before line 135 that you have omitted, ...
    (comp.lang.cpp)

Quantcast