You're leaving WAY too much information out.
For instance, what version of Excel are you using?
What format do you want to save it in?
WHERE do you want to save it?
What do you want to call it?

and... How much experience do you have with VBA?

=============================================
The different versions of Excel have some different options.
for instance, in Excel2007, you can save the file as a Macro Enabled file, or
without macros, or you can save it as an Excel97 version.

So, I'd start with recording a macro in which you save the
file, manually entering a date DIFFERENT than today.

You should get something like:

Sub SaveFile()
'
' SaveFile Macro
'
    ChDir "C:\temp"
    ActiveWorkbook.SaveAs Filename:="C:\temp\Save_New_05-05-2009.xlsm", _
        FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
    Application.WindowState = xlMinimized
End Sub

You can lose some of it.
You also want to create a date string with the current date, like:


    strDate = Format(Now, "yyyy-mm-dd")

Now, the simplest version of the macro would be something like:

Sub SaveFile()
    Dim strDate, saveFolder
    saveFolder = "C:\temp\"
    strDate = Format(Now, "yyyy-mm-dd")
    ActiveWorkbook.SaveAs Filename:=saveFolder & "New_File_" & strDate & ".xls"
End Sub

Now, if you're using Excel2007, you'll want to use "xlsm" instead.

I think that gives you a start.
More specific help is not possible without some answers from YOU!!!

good luck.

Paul


 




________________________________
From: Dhartikumar Sahu <dhartiku...@gmail.com>
To: excel-macros@googlegroups.com
Sent: Wednesday, May 27, 2009 8:22:00 AM
Subject: $$Excel-Macros$$ hi


hi all

can anybody help me for saving the file with current date. (e.g. dhartikumar - 
27 May 2009)
in  macro code.

Thanks & Regards
Dhartikumar


--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---

Reply via email to