Create New Worksheet and Copy Microsoft Excel Object

lynnhenry

New Member
Joined
Jun 9, 2015
Messages
1
I've been working on this for a few weeks to no avail. I've tried to search the internet during that time for an answer but I think there are too many components in my searches to find an answer... so I'm turning to this forum for help - and any help is greatly appreciated.

I've got a spreadsheet that I'm using as a call log for my work.

I use it one week at a time so ultimately I will have 52 (or 53, depending how the calendar falls) sheets. I only want the current week displayed.

I have created a macro button (Create_Next_Week) to create the next sheet (next week) via vba coding. The code creates the new sheet (sheet2), copies the formatting, dates, formulas... etc. from the original sheet (sheet1) into the new sheet (sheet2), then renames the new sheet to reflect the current week, then hides (sheet1) so only the current week (sheet2) is visible.

The problem: I have code (Microsoft Excel Object) for (sheet1) that captures the date and time of each call when I enter the name of the person called. When I create (sheet2), I cannot figure out a way to copy that code from (sheet1) into (sheet2) during the (Create_Next_Week) operation. I can get around this by simply manually copying the code (right-click sheet1, view code, copy the code) then pasting it (right-click sheet2, view code, paste).

This is a cumbersome way to achieve the desired result and I feel there is a way to accomplish this during the (Create_Next_Week) macro.

Could someone please help me with code to copy the Microsoft Excel Object from one sheet to another sheet?

Again, any help would be appreciated.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,214,606
Messages
6,120,483
Members
448,967
Latest member
visheshkotha

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