Hi all,

I would like to run a macro when cells are clicked. I've placed my code into the worksheet level, but I'm not getting any activity. I don't know if I need to "turn it on" somehow or what exactly...

Here's a couple versions of what I have, but in both cases when I switch back to the worksheet, Nothing happens. I'm trying to do a yes no questionnaire without buttons or data validation drop downs. You click the "Yes" cell, and it puts "Yes" in the reference column and changes the color of the clicked cell while "greying out" the "No" cell. And if you then go click on the "No" cell it reverses it.

Furthermore, I would like to know how to apply this across several ranges. I'm terrible with this sort of thing in VBA, but I could make a formula in no time.

The only difference between the versions is one calls another function, but I don't see why it can't just do the work at the event.

Ver 1
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    Call SelectionActivity
End Sub
Private Sub SelectionActivity()
If Target.Address = "B2:B22" Then
        Range("B2:B22").Interior.Color = RGB(200, 160, 35)
        Range("D2:D22").Value = "Yes"
        Range("C2:C22").Font.Color = RGB(150, 150, 150)
        Range("C2:C22").Interior.Color = RGB(200, 200, 200)
    End If
    If Target.Address = "C2:C22" Then
        Range("D2:D22").Interior.Color = RGB(200, 160, 35)
        Range("D2:D22").Value = "No"
        Range("B2:B22").Font.Color = RGB(150, 150, 150)
        Range("B2:B22").Interior.Color = RGB(200, 200, 200)
     End If
End Sub
Ver 2
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Address = "B2:B22" Then
        Range("B2:B22").Interior.Color = RGB(200, 160, 35)
        Range("D2:D22").Value = "Yes"
        Range("C2:C22").Font.Color = RGB(150, 150, 150)
        Range("C2:C22").Interior.Color = RGB(200, 200, 200)
    End If
    If Target.Address = "C2:C22" Then
        Range("D2:D22").Interior.Color = RGB(200, 160, 35)
        Range("D2:D22").Value = "No"
        Range("B2:B22").Font.Color = RGB(150, 150, 150)
        Range("B2:B22").Interior.Color = RGB(200, 200, 200)
     End If
End Sub