VBA - If Previous Day is a Bank Holiday, Open File From Previous Working Day
问题 I am struggling with working this one out. Basically, what I currently have is code to open the previous working days file. x = Weekday(Date, vbSunday) Select Case x Case 1 x = 2 Case 2 x = 3 Case Else x = 1 End Select Workbooks.Open Filename:= _ "filepath" & Format(Date - x, "yymmdd") & " - filename.xlsx" Obviously the above doesn't take into consideration Bank/Public Holidays. How can I build this into my code, so for example: Thursday 29/03/2018 - Working day Friday 30/03/2018 - Good