D
Duncs
I've got the following code in a sheet in my workbook:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lngRowNum As Long
If Target.Column = 6 Then
If Target.Value = "Closed" Then
lngRowNum = Target.Row
Target.Range("B" & lngRowNum & ":I" &
lngRowNum).Interior.Color = vbYellow
End If
End If
End Sub
What it's supposed to do is, if you change the value held in column
6--'F'--on any row to 'Closed', it should colour the row from column
'B' to column 'I' in yellow.
So, for example, if I change the value held in F8 to 'Closed', it
should colour the background of cells B8 -> I8 in yellow. What it
does is, colours the background of cells G15 -> N15 in yellow!
Have I missed something, or do I misunderstand something?
Duncs
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lngRowNum As Long
If Target.Column = 6 Then
If Target.Value = "Closed" Then
lngRowNum = Target.Row
Target.Range("B" & lngRowNum & ":I" &
lngRowNum).Interior.Color = vbYellow
End If
End If
End Sub
What it's supposed to do is, if you change the value held in column
6--'F'--on any row to 'Closed', it should colour the row from column
'B' to column 'I' in yellow.
So, for example, if I change the value held in F8 to 'Closed', it
should colour the background of cells B8 -> I8 in yellow. What it
does is, colours the background of cells G15 -> N15 in yellow!
Have I missed something, or do I misunderstand something?
Duncs