How to make active cell border prominent and keep entire active row selected for better visibility

R

Radhika

Hi everybody!

For better visibility in Excel, I want to highlight the borders of
activecell only as long as the cell is active. Plus I also want to keep
the entire active row selected in some of my workbooks/sheets.

I can achieve the result by using Worksheet.SelectionChange but I dont
know how to switch off the border shading once I move to some other cell
and also keeping entire row selected is a bit dicy becos it keeps
getting off when i use 'clicks' to move to another cell.

Is it possible to achieve this?

Thanks a lot in advance for your efforts and best regards,
Rekha

*** Sent via Developersdex http://www.developersdex.com ***
 
N

Nigel

Try this....
In the sheet(s) being monitored put the following code.....

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target.EntireRow.Select
Call WSChange(Target)
End Sub

In a standard module add this code.....

Option Explicit
Public OldRng As Range

Public Sub WSChange(Target)
If Not OldRng Is Nothing Then
OldRng.Interior.ColorIndex = xlNone
End If
Target.Interior.ColorIndex = 6
Set OldRng = Target
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

Top