?
Solved

Excel auto rename file

Posted on 2009-12-18
1
Medium Priority
?
590 Views
Last Modified: 2012-05-08
Hi experts,

Can excel save file name  according to  CELL A1  ?

I had a Template file named: Invoice.xls , everytime  after input all data   manually press  "save as....."  to rename  it  to      Invoice12345.xls   (file name according to the  invoice no.)
the invoice number  is input at  Cell A1  , is it possible  rename file  automatically  ?

Regards
Stanley
0
Comment
Question by:candychan611
1 Comment
 
LVL 8

Accepted Solution

by:
VipulKadia earned 400 total points
ID: 26078498
Try this macro...
Sub SaveFile()
    ThisWorkbook.SaveAs ThisWorkbook.Path & "\" & Sheet1.Cells(1, 1).Text & ".xls"
End Sub
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question