View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Using VB to renam files

Hi Peter,

Try

Name .FilesFound(i).Filename As fn3

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Peter" wrote in message
...
Hi all

I have used some from the help screen of excel to be able
to find and parse file names in pre-defined folders. What
I would like to know is:

if I find a filename called, say, 01 File 1.XLS and I want
to rename it as just File 1.XLS, how can I do that.

The files are listed using a For : Next loop using

.FilesFound(i) and I have tried to use the code

.FilesFound(i).Filename = fn3 where fn3 is the new name I
want to give the file on disk but that just generates an
error that I can't find a response for.

Any help gratefully received. Thanks