View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Excel ODBC Query

http://support.microsoft.com/support...eio/fileio.asp
File Access with Visual Basic® for Applications

should show you how to open and modify text files.

--
Regards,
Tom Ogilvy

H. Zhu wrote in message
...
There are many Microsoft Excel ODBC Query files. I am attaching one as an
sample. They could be edited with Microsoft Query or with Notepad. What

the
files contain is SQL code; each file has only a few lines.

My task is to open each files, change one word, then close it.

Specifically,
I need to replace the string "Database 2003.mdb" with "Database 2004.mdb".
My challenge is that there are several hundreds of them, which not only

make
my task tedious but also make it impossible to avoid error.

Is there a quick way to do it?

Thanks in advance

Hong