Macro to save the sheet with date as its name!!

ckmoied

Board Regular
Joined
Oct 13, 2002
Messages
154
Hi,

I need a macro that can copy and save the current sheet in another workbook with current date as its name.

Thanx.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
This copies active sheet to new workbook and saves new book as date. This should be enough to get you started.

ActiveSheet.Copy
ChDir "C:\MrE"
ActiveWorkbook.SaveAs Filename:="C:\MrE\" & Day(Date) & Month(Date) & Year(Date), FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.Close
 
Upvote 0
Hi Luke,

Thank you for the macro support. But there is a sort of misunderstanding.

I don't want to create another workbook with the date as its name, rather I want the worksheet to be saved with the date as its name.

Suppose I have a master workbook named "BP_Records.xls", now every time I run this macro my current sheet must be save in BP_Records.xls, with the date as its name.

so if I run this macro on daily basis, for the coming 10 days, then I must have 10 sheets saved in BP_Records.xls, on the 11 day, and all the sheets must have the dates as their names. Also the format of the date must be "dd/mm/yy".

Hope its more clear now. Thanking again for your contribution.
 
Upvote 0
ActiveSheet.Name = Day(Date) & Month(Date) & Year(Date)

NOTE: You can't use \ in sheet names.

If this is to happen each time a sheet is added etc you can make this into a worksheet event.
 
Upvote 0

Forum statistics

Threads
1,221,695
Messages
6,161,360
Members
451,699
Latest member
sfairbro

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