Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have soem code that doesnt quite work properly and was hoping for some guidance. I want to colour the first column of the selected row black, so it highlights to the user which row they are in. Then when the user moves to another row the first column of the previous cell reverst back to no colour. Here is the code so far: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim lRow As Long For lRow = 34 To 100 If lRow = ActiveCell.Row Then Cells(Target.Row, 1).Interior.ColorIndex = 1 Else Cells(Target.Row, 1).Interior.ColorIndex = xlNone End If Next End Sub I think the problem is with the line: If lRow = ActiveCell.Row Then Can anyone help me? Thanks in advance. Martin |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Row select mode to highlight active row of active cell | Excel Discussion (Misc queries) | |||
run macro although blinking cursor is active in an active cell | Excel Programming | |||
referring to formula in a non active cell from active cell | Excel Discussion (Misc queries) | |||
I need to sort an active sheet using the col of the active cell | Excel Programming | |||
Copy from active sheet and paste into new sheet using info from cell in active | Excel Programming |