P
Pete Csiszar
Hi All,
I have put together the following sub which changes the color of whatever
cell is active to green.
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Excel.Range)
Static DataField As Range
If Not DataField Is Nothing Then
DataField.Interior.ColorIndex = xlColorIndexNone
End If
Target.Interior.ColorIndex = 4
Set DataField = Target
End Sub
My problem is that I have been unable to limit this routine to a specific
range of cells (actually two specific ranges) in this case D7
14 and F7:F14
As it is right now, no matter what cell I click on, it turns green.
Any help would be much appreciated.
Pete
I have put together the following sub which changes the color of whatever
cell is active to green.
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Excel.Range)
Static DataField As Range
If Not DataField Is Nothing Then
DataField.Interior.ColorIndex = xlColorIndexNone
End If
Target.Interior.ColorIndex = 4
Set DataField = Target
End Sub
My problem is that I have been unable to limit this routine to a specific
range of cells (actually two specific ranges) in this case D7

As it is right now, no matter what cell I click on, it turns green.
Any help would be much appreciated.
Pete