The following code will open the specific file I need:
Sub OpenRoutingOpen12()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Application.AskToUpdateLinks = False
txtdate = Format(Now, "m_d_yyyy") & "%208am"
Workbooks.Open "https://sharepoint.abc.com/sites/st... by Bucket/Staffing_Routing_Point_Open_Report_" & txtdate & ".xlsx"
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub
However, sometimes, the users name the file a little differently (not consistent). This code pulls up todays 8am report in sharepoint.
Staffing Routing Point Open Report 9.10.19 at 8am.xlsx
Staffing_Routing_Point_Open_Report_9_10_2019 8am.xlsx
Any ideas on how I can open either/or report name instances above? These reports are created every 2 hours so the next one will have 10am.xlsx at the end.
Sub OpenRoutingOpen12()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Application.AskToUpdateLinks = False
txtdate = Format(Now, "m_d_yyyy") & "%208am"
Workbooks.Open "https://sharepoint.abc.com/sites/st... by Bucket/Staffing_Routing_Point_Open_Report_" & txtdate & ".xlsx"
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub
However, sometimes, the users name the file a little differently (not consistent). This code pulls up todays 8am report in sharepoint.
Staffing Routing Point Open Report 9.10.19 at 8am.xlsx
Staffing_Routing_Point_Open_Report_9_10_2019 8am.xlsx
Any ideas on how I can open either/or report name instances above? These reports are created every 2 hours so the next one will have 10am.xlsx at the end.