-
Is there another way to find the type of an object other than the TypeOf statement? If I check for types of controls that aren't included in the project, it generates an error which can't be handled. I've considered using the Object object and just try every property (.Text, .Caption etc) but that seems kind of sloppy. Any suggestions?
Thanks.
Drew
-
Why can't the Error be handled? Try placing an On Error Resume Next at the top of your code and test it out.
-
the typof syntax is
If TypeOf MyControlinstance Is MyControltype Then
what do you have?
-
TypeName(Controlinstance) returns the type name
-
Thanks kedaman, that solved my problem.
-
Megatron: It's not a runtime error, it's a compile error.