Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Catching duplicate filenames when renaming a file
Hi,
In my code I have to rename some files, using the command: Name oldfilename as newfilename Sometimes the newfilename already exists so I am looking for a way to detect that condition, I tried: If iserror(Name oldfilename as newfilename) then CODE HERE else name oldfilename as newfilename end if However, Excel "Expects list seperator or )" around the oldfilename in the iserror statement. Help! Also, for this code I am in the middle of an application filesearch so I can't search for the file using application.filesearch. Thank you!!! Phil |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VB file renaming. | Excel Worksheet Functions | |||
Renaming A File | Excel Discussion (Misc queries) | |||
CATCHING DUPLICATE INFORMATION IN DIFFERENT CELLS SAME PROGRAM | Setting up and Configuration of Excel | |||
Catching an Open Excel File with VBScript | Excel Programming | |||
Renaming a file | Excel Programming |