I've got a VB6 app that I'm updating, I have a call into a function that's supposed to return an array of strings to the caller. On return, I thought I'd check UBound(returnedArray) and populate a list box with the contents, if any. Turns out that if nothing was "returned", the Variant argument still gets set from Empty to a Variant/String(), but with no contained data. This causes UBound to throw an error.
I've tried IsArray and IsEmpty. I can't use IsNull because the called function returns a string array which can't be set to null. I've run out of ideas on what I could possibly use to test if there's valid data. VB6 isn't my strong suit... any ideas?
Edit: NM, I went and changed the called function to take a string array as a parameter and return a count. That'll suffice, and noone will be the wiser. Damn legacy apps.
I've tried IsArray and IsEmpty. I can't use IsNull because the called function returns a string array which can't be set to null. I've run out of ideas on what I could possibly use to test if there's valid data. VB6 isn't my strong suit... any ideas?
Edit: NM, I went and changed the called function to take a string array as a parameter and return a count. That'll suffice, and noone will be the wiser. Damn legacy apps.
Last edited:
