i have declared an array but if there are no elements in it i'm getting an error:

Error 9
Subscript out of range: 'lbound'
clsCanvas:Running script

VB Code:
  1. dim arrayE() as variant
  2.  
  3. 'code
  4. redim preserve array(counter)
  5. arrayE(counter) = aVariable
  6.  
  7. for i = 0 to ubound(arrayE)
  8.   msgbox arrayE(i)
  9. next i


if i have 1 element in the array the array's ubound is 0, so i cannot check on O, do i have to check on ubound(arrayE) > -1??

or is there another solution?