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"
 

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

Similar Threads

SaveAs 6
File SaveAs 1
Suggest a filename for SaveAs 5
SaveAs *.txt - Outputting with Text quantifiers 4
Save As Macro 6
Confirm SaveAs takes place. 6
xlsm SaveAs xls 4
VBA SaveAs function generates blank CSV file 4

Back
Top