View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
K[_2_] K[_2_] is offline
external usenet poster
 
Posts: 557
Default Macro to Find File in Subfolders and Open it

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