First I dimension an array
Public MyArray() as string
Then I feed it with received data buffer of items separated by VbCr thus -
MyArray=Split(Buffer,VbCr)
I can test if data was received OK later by Ubound(MyArray) giving the number of elements or testing the first element.
But my problem is if the data is not received, the Array still has no elements. Ubound(MyArray) and any attempt to test a MyArray element gives an error.
IsEmpty(MyArray) gives false whether the data is there or not.
Apart for using a separate On Error Goto or having an additional flag, is there any other way of directly testing if a dynamic array is empty or not?
Public MyArray() as string
Then I feed it with received data buffer of items separated by VbCr thus -
MyArray=Split(Buffer,VbCr)
I can test if data was received OK later by Ubound(MyArray) giving the number of elements or testing the first element.
But my problem is if the data is not received, the Array still has no elements. Ubound(MyArray) and any attempt to test a MyArray element gives an error.
IsEmpty(MyArray) gives false whether the data is there or not.
Apart for using a separate On Error Goto or having an additional flag, is there any other way of directly testing if a dynamic array is empty or not?