Annelies
Programmer
- Nov 25, 2001
- 72
Hi
I have some code that loops through all controls on a form. I want to be able to determine what type (eg, Combobox, TextBox, CommandButton etc) each control is.
My code looks like:
Dim c as Control
For Each c In Me.Controls
If (c.?? = TextBox) Then
'Do something
End If
Next c
TypeOf doesn't work.
FormControlType property doesn't work.
Surely there must be an easy way to do this!?!
Any help gratefully received!
Annelies
I have some code that loops through all controls on a form. I want to be able to determine what type (eg, Combobox, TextBox, CommandButton etc) each control is.
My code looks like:
Dim c as Control
For Each c In Me.Controls
If (c.?? = TextBox) Then
'Do something
End If
Next c
TypeOf doesn't work.
FormControlType property doesn't work.
Surely there must be an easy way to do this!?!
Any help gratefully received!
Annelies