Sub Main()
Dim FSO As New FileSystemObject
Dim Fl As File
Dim Folder As Folder
Dim F_Name, F_Path As String
F_Path = ThisWorkbook.Path & "\"
Set Folder = FSO.GetFolder(F_Path)
F_Name = "CI*.*"
For Each Fl In Folder.Files
If Fl.Name = F_Name Then
GoTo Report
End If
Next
Report:
Workbooks.Open Filename:=F_Path & F_Name
I would like to open a excel file with same location but I know only part of file name so please assist how can I open the file name. Thanks!