Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

limitation of Selection.Copy

Status
Not open for further replies.

alfredjp

Technical User
Jul 3, 2002
58
JP
what would be a better way to copy TONS of data from one excel workbook to another excel workbook?

what ive done was to use Cells.Select to "define" an entire range of data, and use Selection.Copy, then i transfer to the second workbook and use .Paste... unfortunately, it somehow fails when there is TOO much data...

on a more technical note, does Selection.Copy utilize the OS' clipboard (which of course has a limitation of 64K), or does it use something else? is there a limit of the size that "Selection.Copy" can copy?

=alfred
 
As Cells.Select selects the entire worksheet, you might as well use something like

Sheets("SheetToCopy").Copy _
Before:=Workbooks("DestinationBook").Sheets(1)
ActiveSheet.Name = "CopiedSheet"

A.C.
 
Acron is right if you want to copy the whole sheet
If you have a set range to copy, don't bother selecting them. Use this syntax

With sheets("DataFrom").range("CopyRange")
.copy detination:= sheets("SheetsTo").Range("CopyToRange")
end with

This does away with select copy paste and is MUCH quicker and more stable Rgds
~Geoff~
 
thanks for all the replies... now i know how to implement what i need...
as expected... with VB/VBA so wide in scope, one just cannot but avoid gaps in their knowledge...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top