Save excel file with filename = cell text

  • Thread starter Thread starter TroyB
  • Start date Start date
T

TroyB

Hi,

I'd like to add some code to the end of my macro that saves the current
excel file with a filename derived from the text of two cells in the
worksheet. ie: i4 = 5486, i3 = TB --> The filename would be 5486TB.xls
What code do i need?

Thank you for your help
Regards
Troy
 
ActiveWorkbook.SaveAs Range("I4") & Range("I3") & ".xls"

Of course, this assumes that (a) the current directory is the one that you
want save the file into and (2) there is no file by the same name in the
same location. So you will need some error-checking.
 
Back
Top