ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copy and paste contents of sheet (https://www.excelbanter.com/excel-programming/377409-copy-paste-contents-sheet.html)

[email protected]

copy and paste contents of sheet
 
I want to copy an entire sheet and paste it into another existing
sheet. Using the code below causes my cpu to peg for serveral minutes.
The range is usually around a1 to h400.

Here is the code I am using:

Worksheets(2).Select
Cells.Select
Selection.Copy

Worksheets(3).Select
ActiveSheet.Paste
Application.CutCopyMode = False

Thanks for any help you can provide.


Tom Ogilvy

copy and paste contents of sheet
 
Worksheets(2).Range("A1:H400").Copy _
Worksheets(3).Range("A1")
Application.CutCopyMode = False

--
Regards,
Tom Ogilvy


" wrote:

I want to copy an entire sheet and paste it into another existing
sheet. Using the code below causes my cpu to peg for serveral minutes.
The range is usually around a1 to h400.

Here is the code I am using:

Worksheets(2).Select
Cells.Select
Selection.Copy

Worksheets(3).Select
ActiveSheet.Paste
Application.CutCopyMode = False

Thanks for any help you can provide.




All times are GMT +1. The time now is 11:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com