Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all, i have a string variable with the path that i retrieved my file from
and i need to save the file after manipulation to the same path, just with a "ZA_" in front of the file name. e.g. Get: \\nv09001\za-t-m-2$\Department\T-M-22\Kevin\Projects\EM-13 SBM Workshops 07\FII 08\LIPEK_2008_080429.xls Save: \\nv09001\za-t-m-2$\Department\T-M-22\Kevin\Projects\EM-13 SBM Workshops 07\FII 08\ZA_LIPEK_2008_080429.xls Thank you for any help in advance.. -- Les |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this code structure...
GetName = "c:\dir1\dir2\dir3\file.txt LastSlash = Instrrev(GetName,"\") SaveName = Left(GetName, LastSlash) & "ZA_" & Mid(GetName, LastSlash + 1) Rick "Les" wrote in message ... Hi all, i have a string variable with the path that i retrieved my file from and i need to save the file after manipulation to the same path, just with a "ZA_" in front of the file name. e.g. Get: \\nv09001\za-t-m-2$\Department\T-M-22\Kevin\Projects\EM-13 SBM Workshops 07\FII 08\LIPEK_2008_080429.xls Save: \\nv09001\za-t-m-2$\Department\T-M-22\Kevin\Projects\EM-13 SBM Workshops 07\FII 08\ZA_LIPEK_2008_080429.xls Thank you for any help in advance.. -- Les |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanx Rick
-- Les "Rick Rothstein (MVP - VB)" wrote: Try this code structure... GetName = "c:\dir1\dir2\dir3\file.txt LastSlash = Instrrev(GetName,"\") SaveName = Left(GetName, LastSlash) & "ZA_" & Mid(GetName, LastSlash + 1) Rick "Les" wrote in message ... Hi all, i have a string variable with the path that i retrieved my file from and i need to save the file after manipulation to the same path, just with a "ZA_" in front of the file name. e.g. Get: \\nv09001\za-t-m-2$\Department\T-M-22\Kevin\Projects\EM-13 SBM Workshops 07\FII 08\LIPEK_2008_080429.xls Save: \\nv09001\za-t-m-2$\Department\T-M-22\Kevin\Projects\EM-13 SBM Workshops 07\FII 08\ZA_LIPEK_2008_080429.xls Thank you for any help in advance.. -- Les |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I use code/macro to change code/macro in an existing file? | Excel Programming | |||
Change Code in Macro to specify file/folder to look in. | Excel Programming | |||
macro code to change file-opening password | Excel Programming | |||
Import VBA Code in Excel-File ? (Export VBA Code to file) | Excel Programming | |||
Excel VBA - How do I programmatically change source code in another file? | Excel Programming |