This doesnt work for user defined types.
Chip Pearson's typeOf does.
Thanks though.
"Rick Rothstein (MVP -
VB)" wrote:
In java, I use the instanceof keyword to check if an object is a certain
type of class.
So you can do things like:
if (s instance of string) then output("String!!!") else output("Needs a
string")
Whats the equivalent in VBA?
I don't know Java, but I think you are looking for either the VarType or
TypeName function (they are similar, but one outputs a number representing
the data type and the other outputs the data type name as a String value).
Rick