Hi,

I'm using the Variant Type on eVB 3.0, but when I want to see the content of
the variable, I have error written.

See the following code :
--------------------------------------------------
Dim OldParentVar() As Variant
...
For I = 1 To 20
OldParentVar(I) = "toto"
Next
...
---------------------------------------------------

So, the content of the variable is empty.
Do you have an idea of the problem ?

Thanks in advance.

Re: Using Variant Type by Paul

Paul
Wed Oct 20 07:50:03 CDT 2004

Do you want the Grey or White answer to that question?

PK

"Gandalf" <Gandalf@discussions.microsoft.com> wrote in message
news:D65E38D7-0277-4B79-8420-9BB2CD71ECFE@microsoft.com...
> Hi,
>
> I'm using the Variant Type on eVB 3.0, but when I want to see the content
of
> the variable, I have error written.
>
> See the following code :
> --------------------------------------------------
> Dim OldParentVar() As Variant
> ...
> For I = 1 To 20
> OldParentVar(I) = "toto"
> Next
> ...
> ---------------------------------------------------
>
> So, the content of the variable is empty.
> Do you have an idea of the problem ?
>
> Thanks in advance.



Re: Using Variant Type by Chris

Chris
Wed Oct 20 13:32:59 CDT 2004

You've not dimensioned the original array. And FYI, *all* variables in eVB
are Variant, no matter how you declare them.

-Chris


"Gandalf" <Gandalf@discussions.microsoft.com> wrote in message
news:D65E38D7-0277-4B79-8420-9BB2CD71ECFE@microsoft.com...
> Hi,
>
> I'm using the Variant Type on eVB 3.0, but when I want to see the content
> of
> the variable, I have error written.
>
> See the following code :
> --------------------------------------------------
> Dim OldParentVar() As Variant
> ...
> For I = 1 To 20
> OldParentVar(I) = "toto"
> Next
> ...
> ---------------------------------------------------
>
> So, the content of the variable is empty.
> Do you have an idea of the problem ?
>
> Thanks in advance.



Re: Using Variant Type by Gandalf

Gandalf
Thu Oct 21 03:25:05 CDT 2004

OK, even if I make "ReDim OldParentVar(20)", the problem I had was the
following : I'm using eVB 3.0 and the "Watches Window" which permits to see
the content of my array. But when the loop is executed, I have the following
label :
Expression Value
OldParentVar [Error]

I think it comes from eVB 3.0 because if I make :
"MsgBox(OldParentVar(I))", the content of my array is displayed on the
Message Box...

"Chris Tacke, eMVP" wrote:

> You've not dimensioned the original array. And FYI, *all* variables in eVB
> are Variant, no matter how you declare them.
>
> -Chris
>
>
> "Gandalf" <Gandalf@discussions.microsoft.com> wrote in message
> news:D65E38D7-0277-4B79-8420-9BB2CD71ECFE@microsoft.com...
> > Hi,
> >
> > I'm using the Variant Type on eVB 3.0, but when I want to see the content
> > of
> > the variable, I have error written.
> >
> > See the following code :
> > --------------------------------------------------
> > Dim OldParentVar() As Variant
> > ...
> > For I = 1 To 20
> > OldParentVar(I) = "toto"
> > Next
> > ...
> > ---------------------------------------------------
> >
> > So, the content of the variable is empty.
> > Do you have an idea of the problem ?
> >
> > Thanks in advance.
>
>
>