Reputation: 309
When i'm trying to copy the data in one of the worksheets into new sheet using the below code in EXCEL 2007, WINDOWS 7, I'm facing with the error "excel cannot complete this task with available resources. choose Less data or close other applications".
when i close all other applications, its showing the same message. How to resolve this issue? Please advise.
With ActiveSheet
.Range("A1").Select
.UsedRange.SpecialCells(xlCellTypeVisible).Copy
End With
With ThisWorkbook
Set ws = .Worksheets.Add(After:=.Sheets(.Sheets.count))
NewSheet = ActiveSheet.Name
End With
With ActiveSheet
.Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteColumnWidths
Selection.PasteSpecial xlPasteAll
.Range("A1").Select
End With
When i save the xls as .xls (97-2003) its working fine. But i want to run with more data than 65k
Upvotes: 1
Views: 721
Reputation: 2286
I tested your code on a newly created excel document and copied 80K rows to a new sheet. Your code works...
I did however create it as a macro sub routine and run it multiple times to check.
But you said you saved your document once as a xls. Maybe you got the limitations with it also.
Please and create a new excel document and always save it as xlsx...
Upvotes: 0