Hoping someone here can help me.

The following code is generating a run-time error 9. What is my problem here? The loop to generate the array is working fine but I just want to print the array to another sheet.

r = 2

For i = 1 To UBound (aZips) - 1

Sheets("Sheet2").Cells(r, 5) = aZips(i)

r = r + 1

Next i


Many thanks in advance.