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

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
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,215,045
Messages
6,122,840
Members
449,096
Latest member
Erald

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