View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default VBA.convertFromJava("instanceof")=?

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