ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "save as" macro (https://www.excelbanter.com/excel-programming/285795-save-macro.html)

Peter[_33_]

"save as" macro
 
Happy Holidays

I want to make a macro that will "save as" my exel file using a cell content for th
file name.(using copy-paste) When i do this, it copies the cell content into the macr
as text, and so when the cell content changes for the next "save as", the text in th
macro does not.

Below is what is writen in the macro, as seen in the macro editor
The number in quotation marks, is the value that was in cell F3
If I change le last digit from a 5 to a 6 in F3 and run the macro again
it does not look at the new number in F3, and tries to re-save under the same name

ActiveCell.FormulaR1C1 = "031217PH1855

Thanks for any hel


Izar Arcturus

"save as" macro
 
Hello Peter,

Try this:

Private Sub FlexibleSaveAs()
ActiveWorkbook.SaveAs Filename:=Range("A1").Value
End Sub

-IA


-----Original Message-----
Happy Holidays!

I want to make a macro that will "save as" my exel file

using a cell content for the
file name.(using copy-paste) When i do this, it copies

the cell content into the macro
as text, and so when the cell content changes for the

next "save as", the text in the
macro does not.

Below is what is writen in the macro, as seen in the

macro editor.
The number in quotation marks, is the value that was in

cell F3.
If I change le last digit from a 5 to a 6 in F3 and run

the macro again,
it does not look at the new number in F3, and tries to re-

save under the same name.


ActiveCell.FormulaR1C1 = "031217PH1855"

Thanks for any help

.



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

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