Home All Groups Group Topic Archive Search About
Author
27 May 2005 11:28 PM
Ed Wyche
Right in the cmdTest there is the variable "I".    I would like to have "i"
as the index value of the control array but it keep giving me a -1.  I would
like to have it if I click on the first command button it will be i=0 and so
on.


Private Sub cmdTest_Click(Index As Integer)

    i = cmdTest(Index)     <----------Right here

    frmForm2.Show

End Sub

Author
27 May 2005 11:31 PM
Ed Wyche
I solved my problem.

Show quoteHide quote
"Ed Wyche" <whocares> wrote in message
news:uAUS%23OxYFHA.2128@TK2MSFTNGP14.phx.gbl...
> Right in the cmdTest there is the variable "I".    I would like to have
> "i" as the index value of the control array but it keep giving me a -1.  I
> would like to have it if I click on the first command button it will be
> i=0 and so on.
>
>
> Private Sub cmdTest_Click(Index As Integer)
>
>    i = cmdTest(Index)     <----------Right here
>
>    frmForm2.Show
>
> End Sub
>
>
>
>
>
>
Author
31 May 2005 8:28 AM
Jan Hyde
"Ed Wyche" <whocares>'s wild thoughts were released on Fri,
27 May 2005 19:31:43 -0400 bearing the following fruit:

>I solved my problem.

I assume by changing the code to

i = index

J
Show quoteHide quote
>"Ed Wyche" <whocares> wrote in message
>news:uAUS%23OxYFHA.2128@TK2MSFTNGP14.phx.gbl...
>> Right in the cmdTest there is the variable "I".    I would like to have
>> "i" as the index value of the control array but it keep giving me a -1.  I
>> would like to have it if I click on the first command button it will be
>> i=0 and so on.
>>
>>
>> Private Sub cmdTest_Click(Index As Integer)
>>
>>    i = cmdTest(Index)     <----------Right here
>>
>>    frmForm2.Show
>>
>> End Sub
>>
>>
>>
>>
>>
>>
>


Jan Hyde (VB MVP)

--
When some people go on a diet they have a gut reaction. (Mike Bull)

[Abolish the TV Licence - http://www.tvlicensing.biz/]