View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
J_J[_2_] J_J[_2_] is offline
external usenet poster
 
Posts: 140
Default Trouble increasing the array number and capacity?

Jim,
Thank you. You were correct. Now why didn't I think of that?.
Do you think if I increase the Department number from 6 to 9 as described
above and increase dept. capacities around 20 for most of them (which is the
real case) that doesn't introduce similar problems?
Regards
J_J



"Jim Cone" wrote in message
...
J_J,

You have run out of columns.
RngCell is column C, so lngCol cannot exceed 254...
RngCell(1, 1) is Column 3
RngCell(1, 254) is Column 256

You might try something like this...
If i < 10 Or j < 10 Or k < 20 Or l < 10 Or m < 10 Or n < 10 Then
lngCol = lngCol + 1
If lngCol < 255 Then
GoTo StartOver
End If
End If

Regards,
Jim Cone
San Francisco, USA