I would like to check for control types at runtime.

I tried something like this but I get a run-time error 438
(Object doesn't support this property or method).


Public Sub ControlTypeTest(frm As Form)

Dim m_Ctr As Control

For Each m_Ctr In frm.Controls
Debug.Print m_Ctr.ControlType
Next

End Sub

How can I do this?


Thanks in advance




John,