View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tod[_4_] Tod[_4_] is offline
external usenet poster
 
Posts: 5
Default Change back round color of a cell w/VB

You can use the worksheet change event, like this:

'If the value in A2 = 1, change cell color of A1 to Red
Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Range("A2") Then
If Range("A2").Value = 1 Then
Range("A1").Interior.ColorIndex = 3
Else
Range("A1").Interior.ColorIndex = xlNone
End If
End If
End Sub

tod
-----Original Message-----
I would like to change the color of cell (1,1) to red

by
placing a 1 in in cell (1,2) I can't seem to figur it

out
please help.

Thank you

Sean
.