ilyaskazi,
Something along the lines of
Sub OpenSpecificFiles()
With Application.FileSearch
.NewSearch
.LookIn = "C:\Project"
If .Execute() 0 Then
For i = 1 To .FoundFiles.Count
If .FoundFiles(i) Like "*CHET" Then
Workbooks.Open .FoundFiles(i)
End If
Next i
Else
MsgBox "There were no matching files found."
End If
End With
End Sub
HTH,
Bernie
MS Excel MVP
"ilyaskazi" wrote
in message ...
Given below are the 5 file names in location "C:\project"
FILE_ILYS
FILE_RMSH
FILE_PRVZ
FILE_CHET
FILE_PRTP
Last 4 characters of the file name are the *file signature* assigned
for the person completed the file.
I am trying to open two file on the basis of last 4 characters from
this 5 saved files.
If any of the above file is missing then it should open any next file..
and so on.
--
ilyaskazi
------------------------------------------------------------------------
ilyaskazi's Profile:
http://www.excelforum.com/member.php...o&userid=23969
View this thread: http://www.excelforum.com/showthread...hreadid=375966