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

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" _
 
C

Chip Pearson

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)
 

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

Top