Saving a workbook for each day of the month

baldi

Board Regular
Joined
Sep 15, 2009
Messages
159
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.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
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.
 
Upvote 0
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
 
Upvote 0
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?
 
Upvote 0

Forum statistics

Threads
1,214,586
Messages
6,120,402
Members
448,958
Latest member
Hat4Life

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