ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   rename a workbook using a macro (https://www.excelbanter.com/excel-programming/356309-rename-workbook-using-macro.html)

Jamesmsv

rename a workbook using a macro
 
I am trying to automate workbook saving, and I want each workbook to take
it's name from the word typed into the merged cell range A1:K1. I cannot get
this to work through simple macro-recording action, and VB editing has got me
nowhere! Any ideas?

Paul B

rename a workbook using a macro
 
Jamesmsv, here is one way,

Sub SaveAsSub()

ActiveWorkbook.SaveAs Filename:=Range("A1").Value & ".xls"

End Sub
--
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 2002 & 2003


"Jamesmsv" wrote in message
...
I am trying to automate workbook saving, and I want each workbook to take
it's name from the word typed into the merged cell range A1:K1. I cannot
get
this to work through simple macro-recording action, and VB editing has got
me
nowhere! Any ideas?





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

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