If you want this code to work on a specific sheet, put it in the module for that sheet.
There is no built-in event to determine that the user has scrolled, but you can use the ChangeSelection event which will trigger if they click on any cell. It is possible to write some complicated code to detect scrolling but I'm not sure it's worth it, depending on exactly how you want this to work.
I put this code in your Test sheet module. Any time you select a cell, it will turn the font white if row 15 is visible on the screen.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Range("A15"), ActiveWindow.VisibleRange) Is Nothing Then
Range("A4").Font.Color = RGB(255, 255, 255)
End If
End Sub
If you really really need to detect scrolling let me know and we'll go down that rabbit hole.
Bookmarks