lpking2005
Board Regular
- Joined
- Mar 21, 2011
- Messages
- 140
hi,
I have a range of cells which change color based on some vlookup formulas with conditional formatting.
What i need to do is, if any of these cells change to red, then a picture will appear and disappear if the red cells disappears.
my code looks ok in theory to me, but i must be missing something.
any help would be much appreciated.
heres my current code:
Private Sub Worksheet_Change(ByVal Target As Range)
'
'picture appears when red cells are visible
'
If Cells("C4").Interior.ColorIndex = 3 Then
Sheets("Sheet1").Shapes("picture1").Visible = True
Else
Sheets("Sheet1").Shapes("picture1").Visible = False
End If
End Sub
I have a range of cells which change color based on some vlookup formulas with conditional formatting.
What i need to do is, if any of these cells change to red, then a picture will appear and disappear if the red cells disappears.
my code looks ok in theory to me, but i must be missing something.
any help would be much appreciated.
heres my current code:
Private Sub Worksheet_Change(ByVal Target As Range)
'
'picture appears when red cells are visible
'
If Cells("C4").Interior.ColorIndex = 3 Then
Sheets("Sheet1").Shapes("picture1").Visible = True
Else
Sheets("Sheet1").Shapes("picture1").Visible = False
End If
End Sub