ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to save as using two cell values inside worksheet (https://www.excelbanter.com/excel-programming/311330-macro-save-using-two-cell-values-inside-worksheet.html)

sdblack

Macro to save as using two cell values inside worksheet
 

I want to create a macro to rename a file at the first save using th
value of two cells inside the workbook

--
sdblac
-----------------------------------------------------------------------
sdblack's Profile: http://www.excelforum.com/member.php...fo&userid=1469
View this thread: http://www.excelforum.com/showthread.php?threadid=26318


Tom Ogilvy

Macro to save as using two cell values inside worksheet
 
With ThisWorkbook.Worksheets(1)
ThisWorkbook.SaveAs filename:= _
"C:\MyFolder\" & .Range("A1").value & "_" & _
.Range("B9").Vaue & ".xls"
End With

You said the first save - but it would be hard to suggest much more without
knowing more about the workbook - is it being created from a template, when
the values in the two cells would be created and so forth.

--
Regards,
Tom Ogilvy

"sdblack" wrote in message
...

I want to create a macro to rename a file at the first save using the
value of two cells inside the workbook.


--
sdblack
------------------------------------------------------------------------
sdblack's Profile:

http://www.excelforum.com/member.php...o&userid=14694
View this thread: http://www.excelforum.com/showthread...hreadid=263180





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

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