r/vba • • 22d ago

Unsolved Highlight active row conditional formatting - stale rows

I've got an expense tracker with a highlight active row (light green fill) using '=ROW()=CELL("row")' on A2:E9999 +

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Me.Calculate

End Sub

On a sheet with only a few rows of data (e.g. rows 1–11), clicking in the blank rows underneath (12, 13, 14…) doesn't repaint properly:

  • the old row stays green after you move away, so 2–3 rows are highlighted at once
  • the new row is late to highlight, or only a 1-pixel sliver of it gets drawn
  • zooming in/out with the trackpad instantly repaints it correctly

Has anyone seen this, or know what Excel's repaint logic is actually doing here?

1 Upvotes

2 comments sorted by