ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Export a file with today's date (https://www.excelbanter.com/excel-programming/296764-export-file-todays-date.html)

Grek

Export a file with today's date
 
Hello,

I would like to export my excell workbook with today's date as name.

For instance nameofmyexcellsworbook 20040428.xls

No problem to do the export in VBA. The only problem is that I don'
know how to deal with the date...

Even If I put today() in a cell and then export with the value of thi
cell it doesn't work...

Could you help me please ?

Thank you very much in advance,

Gre

--
Message posted from http://www.ExcelForum.com


gitcypher

Export a file with today's date
 
See the attached file. By your post, im sure you can access the cel
value from within VBA and work with it as you please.

-Gitcyphe

Attachment filename: nameofmyexcellsworbook.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=52914
--
Message posted from http://www.ExcelForum.com


david mcritchie

Export a file with today's date
 
does
http://www.mvps.org/dmcritchie/excel/backup.htm
answer your question. The following was for a directory

filename = "c:\mybackup\B" & Format(Now(), "yyyy_mmdd") & ".xls"
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Grek " wrote in message ...
Hello,

I would like to export my excell workbook with today's date as name.

For instance nameofmyexcellsworbook 20040428.xls

No problem to do the export in VBA. The only problem is that I don't
know how to deal with the date...

Even If I put today() in a cell and then export with the value of this
cell it doesn't work...

Could you help me please ?

Thank you very much in advance,

Greg


---
Message posted from http://www.ExcelForum.com/




Tom Ogilvy

Export a file with today's date
 
? "ABCD " & format(date,"yyyymmdd") & ".xls"
ABCD 20040429.xls


might give you some ideas.

--
Regards,
Tom Ogilvy

"Grek " wrote in message
...
Hello,

I would like to export my excell workbook with today's date as name.

For instance nameofmyexcellsworbook 20040428.xls

No problem to do the export in VBA. The only problem is that I don't
know how to deal with the date...

Even If I put today() in a cell and then export with the value of this
cell it doesn't work...

Could you help me please ?

Thank you very much in advance,

Greg


---
Message posted from http://www.ExcelForum.com/




Grek[_2_]

Export a file with today's date
 
Hi,

Thank you very much for your response.

I ve just tried that and it seems to work :


ActiveCell.Value = Format(Now(), "yyyymmdd")

Thanks again,

Gre

--
Message posted from http://www.ExcelForum.com


Grek[_4_]

Export a file with today's date
 
Thx a lot !

Greg

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 07:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com