Macro to Find File in Subfolders and Open it

K

K

Hi all, I am using excel 2007. In Folder "C:\My Document\Record" I
have many Subfolders and in all those subfolders I have many excel
(xlsx) files. All the files names are like the given example below

523360.xlsx
563361.xlsx
658897.xlsx
……etc

I want macro on a button and I want that when I put file name in cell
A1 (for example like 523360) then macro should check that file in
Folder "C:\My Document\Record" and also in all the subfolders of this
Folder and when macro find that file then it should open it. But if
macro dont find that file at all then it should pop up MsgBox that
"File not Found". Please can any friend can help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top