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.
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.