get path - save new file - same sub-directory as existing file

  • Thread starter Thread starter tegger
  • Start date Start date
T

tegger

Is it possible to amend this code to get the path so as to save the new file
in the same sub-directory as the existing file?

Worksheets(1).Select
ActiveWorkbook.SaveAs Filename:=Format(Range("H22").Value, "d MMMM yyyy") &
" NEW.xls" _
 
Try something like

ActiveWorkbook.SaveAs Filename:=ActiveWorkbook.Path & _
"\" & Format(Range("H22").Value,"d MMMM yyyy) & " New.xls"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 
Back
Top