How to create a monthly worksheet

jonsson

New Member
Joined
Jan 15, 2020
Messages
1
Platform
  1. Windows
Hi all.

I need help please with Excel VBA.

I want a Macro that creates a monthly worksheet for my timesheet project.

For example:

The first worksheet would be named Home and contain the Macro button named 'create month' which creates a copy of the second worksheet which is named October 2021 and if pressed again, created worksheet November 2021 and so on.

Of course the October 2021worksheet I have created manually. The October 2021 worksheet contains a table with the each day of the week listed, like so:

Day Mon Tue Wed Thu Fri Sat Sun
Date 27 28 29 30 1 2 3
Unit

Day Mon Tue Wed Thu Fri Sat Sun
Date 4 5 6 7 8 9 10
Unit

Day Mon Tue Wed Thu Fri Sat Sun
Date 11 12 13 14 15 16 17
Unit

Day Mon Tue Wed Thu Fri Sat Sun
Date 18 19 20 21 22 23 24
Unit

Day Mon Tue Wed Thu Fri Sat Sun
Date 25 26 27 28 29 30 31
Unit

When the 'create month' button is pressed, a new worksheet is created after the October 2021 worksheet and this new worksheet is named November 2021. Also the contents of the October 2021 worksheet is copied over to the November 2021 worksheet, however the dates of the new November 2021 worksheet should reflect the month of November.

I really hope I have explained this properly.

I am trying to automate the insertion of worked hours for each month without having to duplicate each monthly worksheet and the dates too.

If anyone can help with this I would be immensely grateful.

Thank you.
Jonsson
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,214,923
Messages
6,122,289
Members
449,077
Latest member
Rkmenon

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