>see other message
>Out of range occurs when assigning the value to cell A6875...
>
>>*** I get an error on the next line
>>**** Subscript Out of Range (6875) (maxrows= 65536)
>> .Range(cRanges).Value= AllTrim(X12.Schddate)
>
>Any Ideas?
Regret the delayed response, I didnt checked the site yday. I tried setting C65535 with some value and even that worked. So it is not due to cell limits. What were the exact error wordings? Did it give any OLE error ID like "OLE Error Code 0x8**** " . Checking this OLE Error code in MSDN may help.
Some wild guesses. Maybe it is due to some junk data or some formatting type on that particular row? Check the 6875th row of that table. A minor suggestion to speed up your code. You dont need to do Range(cRanges).select or name so many ranges in every loop. You can set values using
.Cells( nArow, 2).value = AllTrim(X12.Schddate) && Cell B
.Cells( nArow, 3).value = AllTrim(X12.TestDate) && Cell C
We do Excel exports using .Cells mechanism and face no problems even with >10000 rows. Maybe try this approach and see if it makes any difference.
HTH.
Hitendra
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only