Zzzzzz
Board Regular
- Joined
- Oct 5, 2004
- Messages
- 206
This will teach me for not using my VBA skills for over a year!
I am taking the lazy route and by coming here first as I do own several of Mr. Excels publications but I am looking for the quickie.
I have a workbook with a worksheet that I use to track open cases. The code should turn the row from A:G red if the value in active cell "F" has a value of Open in it...it's working except it is turning 1 row below, red, and not the active row, but I don't have an offset?
Also on the reverse, if the value is Closed then it needs to remove the pattern
I am taking the lazy route and by coming here first as I do own several of Mr. Excels publications but I am looking for the quickie.
I have a workbook with a worksheet that I use to track open cases. The code should turn the row from A:G red if the value in active cell "F" has a value of Open in it...it's working except it is turning 1 row below, red, and not the active row, but I don't have an offset?
Also on the reverse, if the value is Closed then it needs to remove the pattern
Code:
Selection.Interior.ColorIndex = xlNone
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Range("F" & ActiveCell.Row) = "Open" Then
Range("A" & ActiveCell.Row & ":G" & ActiveCell.Row).Select
End If
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
End Sub