How do I reference my current file in saveas function?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

On a monthly basis, I need to save a lot of templates, located in different
folders. The locations of each folder has a folder named UPDATED located in
the same directory. Furthermore, I need to have UPDATED added to the end of
each file name. This is what I've come up with so far:

ActiveWorkbook.SaveAs "..\UPDATED\" & FILENAME & " UPDATED.xls"

This saves the file in the correct place, but only as "UPDATED.xls". Is
there a function that I can put in the place of FILENAME that will reference
what ever file is currently active, in a way that allows me to add UPDATED to
the end of it?
 
Filename = Left(activeworkbook.name,len(activeworkbook.name)-4)
ActiveWorkbook.SaveAs "..\UPDATED\" & FILENAME & " UPDATED.xls"
 
Back
Top