How do I reference my current file in saveas function?

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?
 
T

Tom Ogilvy

Filename = Left(activeworkbook.name,len(activeworkbook.name)-4)
ActiveWorkbook.SaveAs "..\UPDATED\" & FILENAME & " UPDATED.xls"
 

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