naming .xls file based on a cell in excel

  • Thread starter Thread starter lsu-i-like
  • Start date Start date
L

lsu-i-like

when i hit save as, i would like excel to refer to a certain cell on m
spreadsheet to name the spreadsheet file. is there a way to do this
 
lsu-i-like said:
when i hit save as, i would like excel to refer to a certain cell on my
spreadsheet to name the spreadsheet file. is there a way to do this?
Isu,
With a macro,
Something like;
Asumimg cell you want to use is B2.
Subsitute your path to where you want the file to be saved.

Sub SaveAsFileName()
ActiveWorkbook.SaveAs Filename:="C:\Documents and
Settings\Owner\Desktop\" & Range("B2").Value & ".xls"
End Sub

Dave
 

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