For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > May 2005 > Command Button









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Command Button
Ed Wyche

2005-05-28, 3:55 am

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






Ed Wyche

2005-05-28, 3:55 am

I solved my problem.

"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

2005-05-31, 8:55 am

"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
>"Ed Wyche" <whocares> wrote in message
>news:uAUS%23OxYFHA.2128@TK2MSFTNGP14.phx.gbl...
>



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/]

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com