3

I am passing one object to function which needs to take action according to object type. e.g. If object is of "Scripting.Dictionary" then count keys and if it is "Scripting.FileSystemObject" then close it.

In short as like typeof in c# and variableName.class in java, how we can find which scripting object we are using ?

Sourabh
  • 66
  • 1
  • 6
  • 2
    TypeName works for pre-define data types. when you use TypeName for Scripting.Dictionory object it will return you type is object. I would like to check what type of object it is. – Sourabh Dec 05 '15 at 03:17

1 Answers1

2

Use the TypeName function to get the type of a variable.

TypeName Function

Returns a string that provides Variant subtype information about a variable.

TypeName(varname)
Ansgar Wiechers
  • 175,025
  • 22
  • 204
  • 278