View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Juan Pablo González Juan Pablo González is offline
external usenet poster
 
Posts: 226
Default Open file from vba

Juan wrote:
Hi all...

I have a macro that extracts a series of data that comes
on text format on several files and exports them into a
workbook, it used to be arround 30 files each time so I
renamed them: 1.doc, 2.doc, 3.doc and so on so that the
macro could find them and open them. now I need to rename
arround 600 files, is there a way to open a file from vba
regardless of the name? OPEN NEXT or something like that??
Or can anyone sugest a macro to rename all the files into
the previos format (1.doc, 2.doc,...,2000.doc)?

Any help is greatly appreaciated...

regards
JS


You could adapt the code from he

http://www.contextures.com/xlfaqMac.html#LoopBooks

to use *.doc instead of *.xls

--
Regards,

Juan Pablo González