Macro for Save As

J

Jeremy

I am looking for help with a macro that will run save as and place the file
in the same path as the file being saved as and adding a back to the end of
the file before .xls.

Origional file
B:\One\Two\Origional.xls

Save as file
B:\One\Two\Origionalback.xls

Thank you
 
×

מיכ×ל (מיקי) ×בידן

In principal, thsi is waht you are looking for:
==================
Sub SaveAsBAckUp()
NFN = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) & "BACK"
FULL = ActiveWorkbook.Path & "\" & NFN & ".XLS"
ActiveWorkbook.SaveAs FULL
End Sub
==============
Note: Running the macro - TWICE - on the same File will add another BACK
string.
If you intend to run it on the same file more than once then add a check for
the presence of BACK in the name - normally this is done with INSTR command.
Micky
 
J

Jeremy

Works great but I forgot to add one thing. How would you put the current
date at the end of "Back"?

Thank you
 

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