Link to home
Start Free TrialLog in
Avatar of Whing Dela Cruz
Whing Dela CruzFlag for Anguilla

asked on

Caption

How can I improved the code below wherein I want to display in a textbox (txtIndex.text) each time that I press the command button?  Here's the scenario of the problem.. I have a 5(five) command button name Command1 their index are 100,101,102,103,104  Just in case I press the Command1(103)  I want to display in  a textbox(txtIndex.text) its index number within that command1. Is it Possible? If yes.. Please Help me . if no,  just tell me. Thanks
Private Sub Command1_Click(Index As Integer)
Dim i As Integer
For i = Command1.LBound To Command1.UBound
txtIndex.Text = Command1(i)
Next
End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Whing Dela Cruz

ASKER

Thanks a lot sir!