I have 2 textboxes and 1 combo on a form and I would like to loop for every object on form. If it is a textbox then I will do something.
In VB it will be like:
Dim obj As Object
For Each obj in Form1
If TypeOf obj Is TextBox Then
'...
End If
Next
In VBA, TypeOf method returns the object name.
Q: How can I detect object type?
Thanks in advance
In VB it will be like:
Dim obj As Object
For Each obj in Form1
If TypeOf obj Is TextBox Then
'...
End If
Next
In VBA, TypeOf method returns the object name.
Q: How can I detect object type?
Thanks in advance