Forum Discussion

hao_bai's avatar
hao_bai
Occasional Contributor
16 years ago

How can I convert Object to string and print the error warning message directly via VB?

How can I convert Object to string and print the error warning message directly via VB?

<code>

Sub ObjSearch(Object)  

  If Not Object.Exists Then

    Log.Message("Not found Object " + CStr(Object))

  End If    

End Sub



Sub Main()

  Call ObjSearch(Aliases.Sys.processCMD.CMDClass)                          

End Sub

</code>

Will get a "An exception occurred in the "Unit1" unit at line 5:VBScript don't support Cstr"


20 Replies