Highlight row

J

Jimbola

Hi,

I want an entire row to be highlighted (aka selected, as
if clicking on the row number) if I click any cell in
column I. I Know how to select a cell and how to highlight
a row and how to use the worksheet change event. But not
how to say highlight the row with the cell row number.

Any help would be greatly appreciated.
 
T

Tod

If I read you correctly, you want to select the row for
the cell being made active if that cell is in Column I.

Try this:

Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
If Target.Column = 9 Then
Rows(Target.Row).Select
End If
End Sub

tod
 
J

Jimbola

This is close but it relies on a change being made to the
cell for it to work. I want the row to be highlighted if
you select it using the mouse or cursor keys
 
T

Tom Ogilvy

The CHANGE event requires a change in the cell. The suggestion was to use
the SELECTIONCHANGE event which does what you want.
 
G

Guest

Thanks....I so totally didn't notice that.

Tom Ogilvy said:
The CHANGE event requires a change in the cell. The suggestion was to use
the SELECTIONCHANGE event which does what you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top