title: VBA - If Previous Day is a Bank Holiday, Open File From Previous Working Day
body: <p>I am struggling with working this one out. Basically, what I currently have is code to open the previous working days file.</p>
  
  <pre><code>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" &amp; Format(Date - x, "yymmdd") &amp; " - filename.xlsx"
  </code></pre>
  
  <p>Obviously the above doesn't take into consideration Bank/Public Holidays. How can I build this into my code, so for example:</p>
  
  <p>Thursday 29/03/2018 - Working day</p>
  
  <p>Friday 30/03/2018 - Good Friday (Bank Holiday)</p>
  
  <p>Monday 02/04/2018 - Easter Monday (Bank Holiday)</p>
  
  <p>Tuesday 03/04/2018 - Working day</p>
  
  <p>When I come in on Tuesday and run my macro I want it to pick up the last working days file and use that (Thursday 29/03). With my current code that wouldn't be picked up and it would be looking for Mondays file (which obviously doesn't exist).</p>
  
  <p>I hope that makes sense !</p>
  
  <p>Thanks,
  Jason</p>