[RESOLVED] Uninitialized Arrays
Awhile ago I came across a neat trick to detect uninitialized arrays, e.g.
Code:
Dim foo() as string
If XXX = -1 Then Debug.Print "Array is uninitialized."
I can't remember what XXX is, I apparently didn't make a note of it in my Google Notebook of VBA tricks, and I can't remember which of the countless Excel apps I used this trick in.
It was really short, neat but unintuitive. I remember that whatever the test was, the value was supposed to be -1. I could always error trap a UBound call, but I'd like to know what the trick was.
Does anyone know?
Thanks!
Pete