first column in row

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

Hello,

I want to colour the first column in the active row to black, to highlight
to the user which row is being edited (just to assist in end user comfort!).
I have the follwoing code which doesnt work, can anyone help?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range(Cells(ActiveCell.Row, 1)).Interior.colourindex = 1
End Sub

Thanks in advance. Sorry it's basic, I just cant think how to do this.

M
 
Try:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
Cells(Target.Row, 1).Interior.ColorIndex = 1
End Sub
 
Thanks, worked perfectly.

M

Gary''s Student said:
Try:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
Cells(Target.Row, 1).Interior.ColorIndex = 1
End Sub
 

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

Back
Top