ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I insert the contents of a cell as a filename? (https://www.excelbanter.com/excel-programming/323702-how-can-i-insert-contents-cell-filename.html)

Tim Richards[_3_]

How can I insert the contents of a cell as a filename?
 
I am setting up an auto-save macro button to simplify my processes when using
a template I designed.Some people using this template are not saving to the
correct area of the shared drive. They also are not using the same format
consistantly(multiple users utilyzing the same template).I have created a
cell that reflects the customer name and work order, and I want to use this
cell as my "save as" text when saving the template(via a macro). I can
default the location easy enough, but the macro is a problem. The macro works
the first time, but the next time I try to save the template, the macro has
hard coded the previous cell contents and doesn't update correctly.

Bob Phillips[_6_]

How can I insert the contents of a cell as a filename?
 
Try

Activeworkbook.SaveAs FileName:=Worksheets("Sheet1").Range("A1").Value

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Tim Richards" <Tim wrote in message
...
I am setting up an auto-save macro button to simplify my processes when

using
a template I designed.Some people using this template are not saving to

the
correct area of the shared drive. They also are not using the same format
consistantly(multiple users utilyzing the same template).I have created a
cell that reflects the customer name and work order, and I want to use

this
cell as my "save as" text when saving the template(via a macro). I can
default the location easy enough, but the macro is a problem. The macro

works
the first time, but the next time I try to save the template, the macro

has
hard coded the previous cell contents and doesn't update correctly.




Patrick Molloy

How can I insert the contents of a cell as a filename?
 
WB.SaveAs Ramge("A1").Value

"Tim Richards" <Tim wrote in message
...
I am setting up an auto-save macro button to simplify my processes when
using
a template I designed.Some people using this template are not saving to
the
correct area of the shared drive. They also are not using the same format
consistantly(multiple users utilyzing the same template).I have created a
cell that reflects the customer name and work order, and I want to use
this
cell as my "save as" text when saving the template(via a macro). I can
default the location easy enough, but the macro is a problem. The macro
works
the first time, but the next time I try to save the template, the macro
has
hard coded the previous cell contents and doesn't update correctly.





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

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