Hello,
How do I highligh the entore Row of the current cell using macros?
I have used the below mentioned macros however they dont seem to working as per my need.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
Union(Target.EntireRow, Target.EntireColumn).Select
Intersect(Target.EntireRow, Target.EntireColumn).Activate
Application.EnableEvents = True
End Sub
If I use the above, the cell and its Row and Colunm is being highlighted in grey color.
Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Update 20140318 'Updated By dlsodders for
'Select Just Row
Static xRow
If xRow <> "" Then
With Rows(xRow).Interior
.ColorIndex = xlNone
End With
End If
pRow = Selection.Row
xRow = pRow
With Rows(pRow).Interior
.ColorIndex = 10
.Pattern = xlSolid
End With
End Sub
If I use this, then just that Row gets highlighted in Green, however any background colour to a Row gets removed.
Can anyone please help in writing a code that will just highlight the Row of current cell in light Grey color without removing the backgound color/fill ?
Thank you,
Nisarga.
How do I highligh the entore Row of the current cell using macros?
I have used the below mentioned macros however they dont seem to working as per my need.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
Union(Target.EntireRow, Target.EntireColumn).Select
Intersect(Target.EntireRow, Target.EntireColumn).Activate
Application.EnableEvents = True
End Sub
If I use the above, the cell and its Row and Colunm is being highlighted in grey color.
Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Update 20140318 'Updated By dlsodders for
'Select Just Row
Static xRow
If xRow <> "" Then
With Rows(xRow).Interior
.ColorIndex = xlNone
End With
End If
pRow = Selection.Row
xRow = pRow
With Rows(pRow).Interior
.ColorIndex = 10
.Pattern = xlSolid
End With
End Sub
If I use this, then just that Row gets highlighted in Green, however any background colour to a Row gets removed.
Can anyone please help in writing a code that will just highlight the Row of current cell in light Grey color without removing the backgound color/fill ?
Thank you,
Nisarga.