I have a form with 10 listboxes on it. I also have a command button. How do I make it so that if I press the command button it will select the 3rd item of a listbox of my choosing?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You may do so by converting your 10 listboxes into a control array. If I remember correctly, you do so by specifying the same
Nameproperty and a unique, non-negativeIndexproperty for each one of theListBoxinstances in your form.Assuming you named all of your list boxes as
ListBoxArrand set up theIndexproperty so that the first listbox is 0, the second one is 1, etc. then you can write something like this