Hello,
I'm looking for a way to retrieve all comboboxes in a form and filtering the visibled only.
I'm using a control "for-each" loop. "TypeOf" statement is working, but I can't find how to filter the visible. Is is possible?
Attached is my code.
Thanks
I'm looking for a way to retrieve all comboboxes in a form and filtering the visibled only.
I'm using a control "for-each" loop. "TypeOf" statement is working, but I can't find how to filter the visible. Is is possible?
Attached is my code.
Thanks
Code:
Dim ctrl As Control
For Each ctrl In Me.Controls
If TypeOf ctrl Is ComboBox And ctrl.Visible = True Then
MsgBox (ctrl.text)
End If
Next ctrl