S
Susan
i'm KNOW this is an easy fix, but i just can't find it this
morning...........
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ws As Worksheet
Dim rTarget As Range
Dim rColorSet As Range
Dim lRow As Long
lRow = ActiveCell.Row
Set ws = ActiveSheet
Set Target = ws.Range("n" & lRow)
Set rTarget = ws.Range("d" & lRow)
Set rColorSet = ws.Range("a:ak" & lRow).Resize(1, 0)
If Target = "" And rTarget = "" Then
rColorSet.Interior.Color = 2
End If
If Target <> "" And rTarget = "" Then
rColorSet.Interior.Color = 16
End If
If Target <> "" And rTarget <> "" Then
rColorSet.Interior.Color = 2
End If
End Sub
on this row:
Set rColorSet = ws.Range("a:ak" & lRow).Resize(1, 0)
i keep getting a 1004 error - method range of object worksheet railed.
i looked at a zillion .resize posts but i can't see the
error..........
anybody?
thanks a zillion!
susan
morning...........
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ws As Worksheet
Dim rTarget As Range
Dim rColorSet As Range
Dim lRow As Long
lRow = ActiveCell.Row
Set ws = ActiveSheet
Set Target = ws.Range("n" & lRow)
Set rTarget = ws.Range("d" & lRow)
Set rColorSet = ws.Range("a:ak" & lRow).Resize(1, 0)
If Target = "" And rTarget = "" Then
rColorSet.Interior.Color = 2
End If
If Target <> "" And rTarget = "" Then
rColorSet.Interior.Color = 16
End If
If Target <> "" And rTarget <> "" Then
rColorSet.Interior.Color = 2
End If
End Sub
on this row:
Set rColorSet = ws.Range("a:ak" & lRow).Resize(1, 0)
i keep getting a 1004 error - method range of object worksheet railed.
i looked at a zillion .resize posts but i can't see the
error..........
anybody?
thanks a zillion!
susan