Assign Cell Content As File Name

  • Thread starter Thread starter paul.sternhagen
  • Start date Start date
P

paul.sternhagen

I am attempting to create a macro that will save a workbook with the
file name under which I save the workbook coming from the contents of
one of the cells in the workbook. Suppose that each time the workbook
was altered, a specific cell (A1 on Sheet1 for instance) contained the
desired file name for that workbook. It is my goal to create a macro
that automatically assigns said workbook a name based on the content of
that cell. Any help would be most appreciated.
 
Try something like

ThisWorkbook.SaveAs
filename:=Worksheets("Sheet1").Range("A1").Text


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
How do you use that formula? I tried to figure it out and I can't seem to get
it to work at all
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top