check boxes that highlight row

S

static69

I want to put a check box on the left side of my sheet and when the use
clicks it, it would high light the row. I got it to work once..though
dont know how, and i cant get it to do it again. I used conditiona
formatting and use the cell value=true condition to do it. But now it
not working at all.... any ideas
 
M

mangesh_yadav

Select a check-box from the forms menu. Link cell A1 to this checkbox
Select the entire row you want to highlight. Go to Format > Conditiona
formatting. Select 'formula is'. And enter the following formula in it:
=$A$1=TRUE
Click format button, and select the required color in patterns tab.

Manges
 
B

Bob Phillips

Another approach

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
With Target
If .Column = 1 Then
If .Value = "a" Then
.Value = ""
.EntireRow.Interior.ColorIndex = xlColorIndexNone
Else
.Font.Name = "Marlett"
.Value = "a"
.EntireRow.Interior.ColorIndex = 35
End If
.Offset(0, 1).Activate
End If
End With

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.





--
HTH

Bob Phillips

"mangesh_yadav" <[email protected]>
wrote in message
news:[email protected]...
 
Top