edel2000ie
asked on
What type of object
I am passing a variant to a procedure. In the procedure I want to find out what type of an object I have passed. I am passing textboxes, combo boxes and datepickers. Each are handled slightly differently in the procedure. I know the is a function to tell what kind of object something is. What is it and will it work in this case.
Edel
Edel
Vartype(object)
Returns an Integer indicating the subtype of a variable.
Returns an Integer indicating the subtype of a variable.
Sorry, VarType is not the right one in this case
Use crazyman's TypeOf
Use crazyman's TypeOf
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you Tim Cottee. Excellent answer. I was going with Typeof but your example suits perfectly. All help from everyone much appreciated
Bye
Edel
Bye
Edel
;o(
or
if typeof object is textbox then
end if