How can I check a function return type in another function in vb script.
How can I check a function return type in another function in vb script.
like there are 2 function.Kindly check below
Function A()
Set obj = ----------something here-----
If(Obj.Exists) then
Log.message("ok")
Else
log.message("not ok")
End IF
End Function
Function B()
.....In this function i want to check status of function A... It's true or False----
so I can return value in boolean and check the same
End Function
Um... OK, so that's some basic VBScripting there. Simply...
Function A() Set obj = ----------something here----- A = Obj.Exists End Function
And then, in function B
Function B() If A then Log.Message("Object exists") else Log.Message("Object does not exists") End If End Function
You can try below scenario and check if it works for you
Function A()
Set obj = ----------something here-----
If(Obj.Exists) then
Log.message("ok")
strResult=TRUE
Else
log.message("not ok")
strResult=FALSE
End IF
A=strResult
End Function
Function B()
strResult=A()
If strRESUlt=TRUE Then
log.Message"True"
Else
log.Message"False"
End Function