VBA error in Excel 2003
I did a little more testing and have come to the following conclusion:
Sub test()
Sheets("Sheet1").Range("A1").CurrentRegion.Copy _
Sheets("Sheet2").Range("A1")
End Sub
the above code worked for several years in previous versions of Excel
but produces errors in Excel 2003. The errors occur when the data is
filtered and the data to be copied is made op of non-contiguous rows.
Example:
1. after filtering you want to copy rows 1,5,8,13,23 then there is an
error message
2. after filtering you want to copy rows 1,2,3,4,5,6 then the code
runs fine (NO ERROR)
thanks, Jenny
|