joebickley
Programmer
Hi I have a number of controls on a form that i want to loop though either reading or changeing the data. The code below shows what i have managed thus far.
The above allows me to look at every item and i can find out its name and value but i only want to pick up one particular control type eg CheckBoxes.
Is there a way of doing this??
Thanks
Joe
Code:
Dim ctrlContainer As Control
Dim ctrlNumber As Integer
For ctrlNumber = 0 To Me.Controls.Count - 1
Set ctrlContainer = Me.Controls.Item(ctrlNumber)
' can get things like ctrlContainer.Value
' can get things like ctrlContainer.name
Next
The above allows me to look at every item and i can find out its name and value but i only want to pick up one particular control type eg CheckBoxes.
Is there a way of doing this??
Thanks
Joe