Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Is there a quicker way to copy paste? In an xla the code below is executed by a cmdbutton on a form and is used to copy Sheet1 to Sheet2. The copy paste process takes 12 seconds for 21,000 rows by 10 columns. In its native form (.xls) the same code and with the same data, the copy / paste takes 1 second. Records can exceed 40,000 rows sometimes and a faster way is desirable. Setting Calculation to manual does not appear to reduce the time below 12 seconds in xla form. Is there a better way? T.I.A. Geoff Private Sub cmdExecute_Click() With Application .ScreenUpdating = False .DisplayAlerts = False End With With Sheets(1) '''get last original column lastOrigCol = Split(.Range("IV1").End(xlToLeft).Address, "$")(1) '''copy original data to sheet2 .Range("A:" & lastOrigCol).Copy Destination:=Sheets(2).Range("A1") ''''''other stuff End With With Application .ScreenUpdating = True .DisplayAlerts = True End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
Is there a quicker way to copy a rang abd its formatting this is 2 | Excel Discussion (Misc queries) | |||
help w/ generic copy & paste/paste special routine | Excel Programming | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
Copy and Paste macro needs to paste to a changing cell reference | Excel Programming |