Public IntLg As Integer
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells(1, 1) = Target.Row
IntLg = Cells(1, 1)
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If IntLg <> Target.Row Then Cells(1, 1).Interior.ColorIndex = Int(50 * Rnd) + 1
End Sub