Save As

  • Thread starter Thread starter tc
  • Start date Start date
T

tc

hi. i have a worksheet which contains a name in a particular cell. is
it possible to create a macro that will use this name and save a copy
of the workbook with that name?
 
This doesn't specify a path unless that is in your cell with the
filename. But you can always add that into the code.
Sub foo()
ThisWorkbook.SaveAs Range("A1").Text
End Sub
 
Also, if you are storing your code in a separate workbook, you will
need to use ActiveWorkbook instead of ThisWorkbook.
 

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