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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Collection index -XL2000

Status
Not open for further replies.

BarryG

Programmer
Nov 19, 1999
23
0
0
US
I'm trying to refer to a member of a collection by using a statement for the index. Specifically, I want to move through the controls on a form by using their TabIndex properties, rather than the collection index.

I've tried:
Code:
For i = 1 to Controls.count
   Controls(TabIndex = i).Select
   'do stuff with the selection
Next i

but it doesn't work. Any ideas?
 
Ide,

I tried the shapes collection, but I think it only applies to objects on worksheets, not on UserForms.

Thanks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top