Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Add to WB saved Name
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Add to WB saved Name
Try this
NewName = OldPath & Left(OldName, Len(OldName) - 4) & "_DONE.xls" -- Regards Ron de Bruin http://www.rondebruin.nl "BEEJAY" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Add to WB saved Name
Works Great. Thanks so much
"Ron de Bruin" wrote: Try this NewName = OldPath & Left(OldName, Len(OldName) - 4) & "_DONE.xls" -- Regards Ron de Bruin http://www.rondebruin.nl "BEEJAY" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HOW DO I AUTO NAME A SAVED FILE FROM A SPEC. BLOCK IN EXCEL? | Excel Discussion (Misc queries) | |||
How do I recover a file not saved - auto reboot? | Excel Discussion (Misc queries) | |||
How to get Excel to auto sum after it has been saved with data. | Excel Discussion (Misc queries) | |||
Excel auto opens last saved file. | Excel Discussion (Misc queries) | |||
Auto-Insert "Last Saved By" | Excel Worksheet Functions |