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!

Selecting Objects

Status
Not open for further replies.

toccata

Programmer
Jun 26, 2002
65
US
I have a form with 90 check boxes and 90 text boxes. The text boxes must be filled with text and some set bold based on an arrays of text and text box type. The check boxes must be set visible or not visible based on the text box type array.

How do I do this in a simple loop?
 
This loop will print out the values of all controls and all properties
You could examine each to see if it was a text box or a check box. Then turn them visible or not and so on.

Dim ctl As Control
Dim prp As Property

For Each ctl In Me.Controls
Debug.Print ctl.Properties("Name")
For Each prp In ctl.Properties
Debug.Print vbTab & prp.Name & " = " & prp.Value
Next prp
Next ctl


DougP, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top