ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automatic File Name based on cell content (https://www.excelbanter.com/excel-programming/293706-re-automatic-file-name-based-cell-content.html)

Craig[_13_]

Automatic File Name based on cell content
 
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim CellName As String
CellName = Range("A1")
ActiveWorkbook.SaveAs Filename:="C:\{Path leading to
Desktop}\Current List\" & CellName & ".xls"
End Sub



Prangk wrote in message ...
I just want to expedite my "save as" procedure through this question. I
would like to have an automatic file name based on cell (A1) content.
Then it will save the file "automatically" on a folder located at the
desktop (folder name "Current List"). But all of these will be on
"save as" command. Is this possible?

I will appreciate any help.


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



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

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