Macro slow when copy and pasting

W

wsleepywil

Running Excel 2003

I am copying multiple data ranges from one workbook to another and the macro
just seems to be very slow during the copy phase of each data range. There
are eight ranges of similar size to be copied. The paste phase seems fast.

Here is a sample of the copy and paste code.

Windows("20100204-Data Input-u.xls").Activate
ActiveSheet.Select
Range("b6:g36").Select
Application.CutCopyMode = False
Selection.Copy
Windows("20090401-MST In Use-U.xls").Activate
Sheets("Data").Select
Range("b6:g36").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
 
D

Don Guillett

try this idea. with both open. Be sure of line continuations _ in the right
place. And the first DATA may need to be changed to the name of your source
sheet.

workbooks("20090401-MST In Use-U.xls"). _
Sheets("Data").Range("b6:g36").value= _
workbooks("20090204-Data Input-u.xls"). _
Sheets("Data").Range("b6:g36").value
'=========

Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top