cell contents as filename

  • Thread starter Thread starter Jeff R
  • Start date Start date
J

Jeff R

I have a form that I save under a new filename each time
it is filled out. I would like to record a macro that
saves the file with a name that represents the text in a
certain cell.
Example: Cell A1 contains the name of a customer/job,
lets say Smith22. I would like a macro to automatically
save the file with a filename of Smith22.xls.
The macro would be assigned to a button next to the cell.
Is this possible?
Thanks!
Jeff R
 
Application.DisplayAlerts = False
thisworkbook.SaveAs ThisWorkbook.Path & "\" & _
ThisWorkbook.Worksheets("Sheet1").Range("A1").Value & _
".xls"
Application.DisplayAlerts = True
 

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