Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Open file from vba

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Open file from vba

Beautiful

Works great, thanks Juan!!!



-----Original Message-----
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


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Excel Discussion (Misc queries) 0 April 23rd 09 08:53 PM
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Setting up and Configuration of Excel 0 April 23rd 09 08:53 PM
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
How do I stop Excel from closing the open file each time I open a. Welsin Setting up and Configuration of Excel 3 January 8th 05 11:16 PM


All times are GMT +1. The time now is 02:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"