Tuesday, 25 September 2012

How to check for an empty array in vbscript

In the following example we exit the script with an exit code of one if myArray has zero elements i.e. myArray is empty.
If UBound(myArray) = 0 Then WScript.Quit(1)

References

http://msdn.microsoft.com/en-us/library/fhx59d0t(v=vs.84).aspx

No comments:

Post a Comment