Saving a workbook for each day of the month

baldi

Board Regular
Joined
Sep 15, 2009
Messages
156
ChDir "S:\Table Games\Pit Managers\TG FV SUNRISE\HEADCOUNT"
ActiveWorkbook.SaveAs Filename:= _
"S:\Table Games\Pit Managers\TG FV SUNRISE\HEADCOUNT\11.01.11.xls", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False

I'am using this macro to create a workbook for each day of the month and then the year. How do I make it simple. Right now I have 30 to 31 of these in a macro. Is there a way i can put it into one.
 

Some videos you may like

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

GTO

MrExcel MVP
Joined
Dec 9, 2008
Messages
6,154
You should be able to loop it, but I have a question: Do you really want the code to go with the new workbooks? For instance, you may want the code to run against a template workbook.
 

baldi

Board Regular
Joined
Sep 15, 2009
Messages
156
You should be able to loop it, but I have a question: Do you really want the code to go with the new workbooks? For instance, you may want the code to run against a template workbook.

i don't understand what you mean "you may want the code to run against a template workbook"
we start fresh with the same workbook each day. Right now i have the code in the marco 30 times. I want to know if there is a simpler way of writing it
thanks for the reply
 

GTO

MrExcel MVP
Joined
Dec 9, 2008
Messages
6,154
i don't understand what you mean "you may want the code to run against a template workbook"
we start fresh with the same workbook each day. Right now i have the code in the marco 30 times. I want to know if there is a simpler way of writing it
thanks for the reply

Are you saying that you open the same base workbook and SaveAs the wb based upon the current date?
 

Watch MrExcel Video

Forum statistics

Threads
1,122,499
Messages
5,596,517
Members
414,074
Latest member
Matthew Kakde

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
Top