The following code opens the 8am sharepoint report:
Application.DisplayAlerts = False
Application.AskToUpdateLinks = False
txtDate = Format(Now, "m_d_yyyy") & "%208am"
Workbooks.Open "https://sharepoint.abc.com/sites/Shared Documents/Open Cases by Bucket/Routing_Open_Report_" & txtDate & ".xlsx"
Application.DisplayAlerts = True
However, sometimes the employee doesn't name the file the same everytime. For example, "Routing_Open_Report" may be missing the underscores, etc. I'd rather open the file if it has "8am" within the file name and was created today. How would I re-write this code to accomplish this?
Application.DisplayAlerts = False
Application.AskToUpdateLinks = False
txtDate = Format(Now, "m_d_yyyy") & "%208am"
Workbooks.Open "https://sharepoint.abc.com/sites/Shared Documents/Open Cases by Bucket/Routing_Open_Report_" & txtDate & ".xlsx"
Application.DisplayAlerts = True
However, sometimes the employee doesn't name the file the same everytime. For example, "Routing_Open_Report" may be missing the underscores, etc. I'd rather open the file if it has "8am" within the file name and was created today. How would I re-write this code to accomplish this?