IsObject ( ) Function

Ponder on the following example:

Dim objFSO
Dim boolExists
Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
If IsObject(objFSO.FileExists("C:/autoexec.bat")
MsgBox boolExists
End If

This example illustrates the use of the IsObject ( ) funtion, which is similar to the IsNumeric ( ) and IsDate ( ) Functions that I explained in other posts. If the variable holds a reference to an object, then the function will return True. Otherwise, it will return False.