G
Geoff
Hi
A brief summary of where I am with this. Yesterday I posted the question
when using code from an xla does it take 12 seconds to copy some 20,000 rows
by 10 columns when the same code from an xls wbook, same data, takes only 1
second.
Tom Ogilvy, thanks, suggested copying values only but I need an exact copy
of sheet1 data to use as a backup.
NickHk, thanks, suggested copying the wsheet instead of the data.
Unfortunately this had the effect of increasing the time from 12 to 21
seconds.
From testing it does not appear that turning calculation to manual has any
discernable effect.
To save folk having to find the code in the original post here it is again.
Appreciate any thoughts
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
A brief summary of where I am with this. Yesterday I posted the question
when using code from an xla does it take 12 seconds to copy some 20,000 rows
by 10 columns when the same code from an xls wbook, same data, takes only 1
second.
Tom Ogilvy, thanks, suggested copying values only but I need an exact copy
of sheet1 data to use as a backup.
NickHk, thanks, suggested copying the wsheet instead of the data.
Unfortunately this had the effect of increasing the time from 12 to 21
seconds.
From testing it does not appear that turning calculation to manual has any
discernable effect.
To save folk having to find the code in the original post here it is again.
Appreciate any thoughts
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