title: How to AutoUpdate as each day passes a conditional format based on date?
body: <p>I'm new to writing VBA code but have managed to struggle along for the past couple of weeks.</p>
  
  <p>I have created a code for a worksheet change event that highlights certain dates input within particular windows like so:</p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range) 
      Dim icolor As Integer 
      Dim cell As Range 
      If Intersect(Target, Range("C3:T65")) Is Nothing Then Exit Sub 
      For Each cell In Target 
          icolor = 0 
          Select Case cell 
          Case "": icolor = 2 
          Case Is &lt;= Date + 30: icolor = 3 
          Case Is &lt;= Date + 60: icolor = 6 
          Case Is &gt; Date + 60: icolor = 2 
          End Select 
          If icolor &lt;&gt; 0 Then cell.Interior.ColorIndex = icolor 
      Next cell 
  End Sub 
  </code></pre>
  
  <p>It works flawlessly. However, I need the spreadsheet to basically update the highlighting each day. IE: If Date + 61 is not highlighted today, it will be highlighted tomorrow because it fits the window as Date + 60. I suspect that a simple "worksheet change event" can't do this (because it requires user input).</p>
  
  <p>I have tried tweaking this into a worksheet activate code, to potentially update highlights when the document is opened (and I'm trying to avoid workbook open because I will have multiple sheets doing different things), but I can't get it to work. Any ideas on what I'm doing wrong? Or is there a better way to accomplish what I'm trying to do?</p>
  
  <p>Thanks ahead of time.</p>
  
  <pre><code>Private Sub Worksheet_Activate()
      Dim icolor As Integer
      Dim cell As Range
  
      If Intersect(Target, Range("C3:T65")) Is Nothing Then Exit Sub
      For Each cell In Target
          icolor = 0
          Select Case cell
              Case "": icolor = 2    
              Case Is &lt;= Date + 30: icolor = 3
              Case Is &lt;= Date + 60: icolor = 6
              Case Is &gt; Date + 60: icolor = 2            
          End Select
          If icolor &lt;&gt; 0 Then cell.Interior.ColorIndex = icolor
      Next cell
  End Sub
  </code></pre>