How do we get the object type ?
for instance,
if we got a function c(d as object) where d is any object.
how can we determine the type of object, whether it is textbox, label, etc
thanks.
Printable View
How do we get the object type ?
for instance,
if we got a function c(d as object) where d is any object.
how can we determine the type of object, whether it is textbox, label, etc
thanks.
Try this:
If TypeOf d is TextBox then
MsgBox "Text Box"
End if
You could also use Select Case for different types.
The Types are any control (eg. Label, CheckBox). VB should provide you with a list after you type Is.
Hope this helps,
Nathan Liebke