ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open files which contains given keyword (https://www.excelbanter.com/excel-programming/414854-open-files-contains-given-keyword.html)

Valli

Open files which contains given keyword
 
Hi Everyone,

Thanks in advance for helping me. Sorry for the English.

I would like to open files from a given folder which contains some
keywords in the file name.

Let us take an example:

A folder contains around 100 excel files, i would to open file which
contains the keyword "abc sales" in the file name. If any of the files
having this word in the file name, then that file should be opened.

Can anyone help me.

Cheers

Valli

Ron de Bruin

Open files which contains given keyword
 
Hi Valli

I have this option in my merge add-in
http://www.rondebruin.nl/merge.htm

With code you can test it like this
I use the first code example from this page
http://www.rondebruin.nl/copy3.htm

You can change this line

FilesInPath = Dir(MyPath & "*.xl*")

File names that start with week
FilesInPath = Dir(MyPath & "week*.xl*")

Or contain week
FilesInPath = Dir(MyPath & "*week*.xl*")


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Valli" wrote in message ...
Hi Everyone,

Thanks in advance for helping me. Sorry for the English.

I would like to open files from a given folder which contains some
keywords in the file name.

Let us take an example:

A folder contains around 100 excel files, i would to open file which
contains the keyword "abc sales" in the file name. If any of the files
having this word in the file name, then that file should be opened.

Can anyone help me.

Cheers

Valli


Valli

Open files which contains given keyword
 
It works great. Thanks Ron de Bruin.


All times are GMT +1. The time now is 11:41 PM.

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