Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Indexed Controls 1

Status
Not open for further replies.

kevinf2349

Technical User
Sep 12, 2002
367
US
This seems like it should be pretty simple but I can't seem to get it working. I am trying to use an index for a checkbox control i.e.

for i = 1 to 10
CheckBox(i).Visible
next

And it doesn't like it one little bit. What is the best way of doing this?
 
You can not use control arrays in this way, in dot net any more.

you will have to now declair a control array ...

myCheckBoxes(n) as Checkbox

then set up the check boxes or other controls in it...

myCheckBoxes(0) = checkbox1 ... etc

then you can do

myCheckboxes(i).visible

Becca

Somtimes, the easy answer is the hardest to find. :)

Still under construction ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top