Hi,

I have a piece of code which is intended to open some specific file. the file name comes from a cell. My problem is, I wanted to VBA to see the value from cell, search the entire folder and open the file where the file name contains the cell value.

> If cell value is 4546 then it opens "4546.xls"

I wanted it to be

> if cell value is 4546 it can open file names like "4546_sadsd.xls" or "sdfhjdfs_4546.xls" or "sfsdfs_4546_safdsfs.xls"

I am using wildcard for it but it seems that it is not working.

Also one more point. The file wanted to open is having links to other files. So when the VBA trys to open that, it asks for whether to Update or not. I don't want that pop-up to be showed. I have applied the Application.DisplayAlerts = false but its not working. Any idea why?

Any help will be greatly appreciated.


    MYFLNAME = Cells(3, 3).Value
      
    MYPTH = ThisWorkbook.Path
         
    Application.DisplayAlerts = False
   
    Workbooks.Open Filename:=MYPTH & "\" & MYFLNAME & "*.xls"