ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to include the contents of a cell in a filename (https://www.excelbanter.com/excel-programming/309377-how-include-contents-cell-filename.html)

BARGAIN BIN

How to include the contents of a cell in a filename
 
How do I include the contents of a cell containing the date (which is
automatically updated) in the file name?

Hope I've asked clearly enough.

Thank you,
Leonard



Paul B[_8_]

How to include the contents of a cell in a filename
 
Leonard, see if something like this will help,
MyName = "My Sheet For " & Format(Range("A1"), "mm.dd.yyyy") & ".xls"
ActiveWorkbook.SaveAs Filename:=MyName
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **


"BARGAIN BIN" wrote in message
...
How do I include the contents of a cell containing the date (which is
automatically updated) in the file name?

Hope I've asked clearly enough.

Thank you,
Leonard






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

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