Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I rename the files in a directory? I have many reports in directory I
can loop through each file but how do i rename it? I have an input box to assign a NewFileName. I want to keep the date suffix and change the first part of the filename. This jams in the last line attempts. Please help. I feel like i'm shooting inthe dark now. If Right(myName, 3) = "xls" Then OldFileName = myPath & myName NameDate = Right(myName, 12) NewFileName = (myPath & NewName & " " & NameDate) Workbooks(OldFileName).SaveAs (NewFileName) 'Workbooks(OldFileName).Name = (NewFileName) TIA Candyman |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Maintain cell links when renaming directory containing multiple f | Excel Worksheet Functions | |||
Renaming adding and deleting directory | Excel Programming | |||
Renaming Files | Excel Programming | |||
Renaming all files in a directory | Excel Programming | |||
Check if directory empty OR no of files in directory. | Excel Programming |