Issue with copy worksheet code

gururaj1986

New Member
Joined
Mar 14, 2017
Messages
11
Hi All,

I am using the below code to copy a worksheet to another worksheet. But, what I am trying to achieve is that the workbook pastes this data onto an existing worksheet. Below code creates a new sheet and pastes the contents within. The reason why I am using this code is because the source file contains images, values & formats which I need in the target file (Check this sheet). Is there any way we can copy a worksheet (including formats & images) and paste it to an existing sheet in another existing workbook?

Can anyone please help me with this issue?

Code:
Worksheets("DailyPerformanceReport_rpt").Copy Workbooks("Check this sheet").Worksheets("ZISF")

Thanks,
Guru
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Code:
Worksheets("DailyPerformanceReport_rpt").Cells.Copy Workbooks("Check this sheet").Worksheets("ZISF").Cells

This will not copy any macros attached to the sheet or its objects.

Alternatively, you could delete the destination sheet, copy the source sheet to the destination workbook, rename the sheet
 
Last edited:
Upvote 0
Code:
Worksheets("DailyPerformanceReport_rpt").Cells.Copy Workbooks("Check this sheet").Worksheets("ZISF").Cells

This will not copy any macros attached to the sheet or its objects.

Alternatively, you could delete the destination sheet, copy the source sheet to the destination workbook, rename the sheet

Hey, thanks for the reply :) Actually, this code does work in terms of copy pasting the entire sheet to the new workbook. I cannot do the rename sheet method because there are templates in a separate sheet in the Target file which is picking values from the sheet in which the data was supposed to get pasted. Any workaround for this?
 
Upvote 0
I cannot do the rename sheet method because there are templates in a separate sheet in the Target file which is picking values from the sheet in which the data was supposed to get pasted. Any workaround for this?
Since the code does what you need, presumably you don't need to do it this way?
 
Upvote 0

Forum statistics

Threads
1,224,749
Messages
6,180,731
Members
452,995
Latest member
isldboy

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