Possible Duplicate:
How do I determine if an array is initialized in VB6?
How do I check for an object being Nothing in VB6?
In a situation where a function is returning a dynamic array as result, there is the possibility that the dynamic array was not initialized (For example, error in the execution). Is it possible to check this situation?
Function IsNothing() is not working, and UBound() is creating an error in this case.
For example:
Function find(results() As String)
[Definition here...]
End Function
[...]
Dim results() As String
find(results)
If UBound(results) > 0 Then '<-- This line will fail when results was not defined
[...]
Thanks in advance!