Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identyfing an object type

Status
Not open for further replies.

Yazster

Programmer
Sep 20, 2000
175
CA
Let's say I have a variable declared like this:

Dim X as object

Somewhere in my code I set this in the following way:

Set X = new combobox

Is there a way of finding out what type of object has been set to a variable declared as type "object"?

For example

I could set x to a ListBox type or ComboBox type, is there a way of finding out which one it is?

Thanks,
Yazster
 
the function, typeName, should work:
Code:
typeName(x)

This function will return a string that will tell you the type of object it is.

good luck!:)
Paul Prewett
 
Thanks Paul!

This is exactly what I was looking for.

Yazster.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top