Dim oColl ' object pointer for collection
' Create a collection as an ActiveX object
Set oColl = CreateObject("XSI.Collection")
' Test it with the Type property
If oColl.Type = "XSICollection" Then
LogMessage "This is a collection."
Else
LogMessage "This is a " & oColl.Type
End If
' Compare it to the Application.ClassName method
If ClassName( oColl ) = "Object" Then
LogMessage "This might be a collection."
Else
LogMessage "This is a " & ClassName( oColl ) & "."
End If
'--------------------------------------------------
' Output of above script:
'INFO : "This is a collection."
'INFO : "This might be a collection." |