Hi Guys,
I have a piece of code that fills the active cell with colour but i would like it to work in a set range only and am not sure how to do this.
Any help would be very much appreciated. The range I would like it to work in is D8:O200
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Interior.ColorIndex = xlNone Then
Target.Interior.ColorIndex = 16
Else
Target.Interior.ColorIndex = xlNone
End If
End Sub
Thanks guys
I have a piece of code that fills the active cell with colour but i would like it to work in a set range only and am not sure how to do this.
Any help would be very much appreciated. The range I would like it to work in is D8:O200
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Interior.ColorIndex = xlNone Then
Target.Interior.ColorIndex = 16
Else
Target.Interior.ColorIndex = xlNone
End If
End Sub
Thanks guys