ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel ODBC Query (https://www.excelbanter.com/excel-programming/285239-excel-odbc-query.html)

H. Zhu

Excel ODBC Query
 
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





Tom Ogilvy

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







All times are GMT +1. The time now is 06:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com