Since you are adding the value
arrData1(0, lngIndex)
wouldn't it make sense to test if that is null rather than the value of
UBound(arrData1, 2)
which won't change during each step of the For/Next loop
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|