Nice solution Alex. I took your answer one step further and a little bit to the side :) Instead of opening all similarly named files. I needed to open the Newest, similarly named file. So I did this...
Dim newest As Date
Dim current As Date
Dim right_file As String
Dim rot_cnt As Integer
rot_cnt = 1
Dim my_path As String
Dim file_name As String
my_path = "C:\Path\To\File\Dir\"
file_name = Dir(my_path & "My-Similar-Files*.xlsm")
Do While file_name <> vbNullString
If rot_cnt = 1 Then
newest = FileDateTime(my_path & file_name)
End If
If rot_cnt >= 1 Then
current = FileDateTime(my_path & file_name)
End If
If DateSerial(Year(current), Month(current), Day(current)) >= _
DateSerial(Year(newest), Month(newest), Day(newest)) Then
newest = FileDateTime(my_path & file_name)
right_file = my_path & file_name
End If
file_name = Dir()
rot_cnt = rot_cnt + 1
Loop
Workbooks.Open (right_file), UpdateLinks:=False, ReadOnly:=True
After further testing this uses the last save time over the "real" creation time so it may return unwanted results. BuiltinDocumentProperties("Creation Date") is also a false lead to creation date. This value is cloned if someone copies the workbook. To achieve the proper result without having to manually enable any new references, I used this.
Dim oFS As Object
Dim StrFile As String
Dim rot_cnt As Integer
rot_cnt = 1
Dim current As Date
Dim newest As Date
Dim right_file As String
Dim my_path As String
Dim file_name As String
my_path = "C:\Path\To\File\Dir\"
file_name = "My-Similar-Files*.xlsm"
StrFile = Dir(my_path & file_name)
Do While Len(StrFile) > 0
Set oFS = CreateObject("Scripting.FileSystemObject")
If rot_cnt = 1 Then
newest = oFS.GetFile(my_path & StrFile).DateCreated
End If
If rot_cnt >= 1 Then
current = oFS.GetFile(my_path & StrFile).DateCreated
End If
'The Right(StrFile, 6) If parameter is because Dir() also gives the exact
'string of file_name as one of the values which we don't want to process.
If DateSerial(Year(current), Month(current), Day(current)) >= _
DateSerial(Year(newest), Month(newest), Day(newest)) _
And Right(StrFile, 6) <> "*.xlsm" Then
newest = oFS.GetFile(my_path & StrFile).DateCreated
right_file = my_path & StrFile
End If
StrFile = Dir
Set oFS = Nothing
rot_cnt = rot_cnt + 1
Loop
Workbooks.Open (right_file), UpdateLinks:=False, ReadOnly:=True