VBA Copy and Paste help

redskinsfan

New Member
Joined
Aug 11, 2006
Messages
10
I am currently trying to cut and paste sheet 1 of one workbook to sheet 2 of another workbook. The code I am using works, but it takes a VERY long time to accomplish this simple taks. Is there a more efficient way of doing this? Thanks in advance.

Code:
Windows(ExclusionName & ".xls").Activate
    Cells.Select
    Selection.Copy
    Windows(FileName & ".xls").Activate
    Sheets("All SPIDs by Scorecard").Select
    ActiveSheet.Paste
    Sheets("Score Distribution by SPID & Scorecard").Select
    Windows(ExclusionName & ".xls").Activate

Like i said before this works, but takes over a minute. (It's quicker to do it manually.) Any suggestions?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
That code can be cleaned up.
Code:
Workbooks(ExclusionName & ".xls").ActiveSheet.Cells.Copy Workbooks(FileName & ".xls").Sheets("All SPIDs by Scorecard").Range("A1")
I don't know if that will speed up the operation, I think the slowness is caused because you are copying every cell.
 
Upvote 0

Forum statistics

Threads
1,215,385
Messages
6,124,626
Members
449,174
Latest member
Anniewonder

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top