Auto Add to WB saved Name

B

BEEJAY

Have been trying for some time to determine how to add to a currently saved
workbook name. This is to indicate that the workbook in question has been
processed by the VB Programming.
I have used the following successfully, but so far have not been able to get
the extra added on the end of the name: eg: File name XYZ.XLS becomes
XYZ_Done.xls. I understand that I have to use the dot as a reference point,
since the actual workbook name could be any length (number of characters)
Any suggestions would be appreciated.

Dim OldName As String
Dim OldPath As String
Dim NewName As String

OldPath = ActiveWorkbook.Path & "\"
OldName = ActiveWorkbook.Name

NewName = "DONE_" + OldName

ActiveWorkbook.SaveAs NewName
 

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