robertsmyth100
Board Regular
- Joined
- Sep 25, 2006
- Messages
- 94
Hi,
I am trying to write a code which changes the colour of a cell (A1) when a cell in a range (E14:E15)is selected:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Address = "$E$14:$E$15" Then
Range("A1").Select
With Selection.Interior
.ColorIndex = 0
.Pattern = xlSolid
End With
End If
End Sub
Could anyone help?
I am trying to write a code which changes the colour of a cell (A1) when a cell in a range (E14:E15)is selected:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Address = "$E$14:$E$15" Then
Range("A1").Select
With Selection.Interior
.ColorIndex = 0
.Pattern = xlSolid
End With
End If
End Sub
Could anyone help?