ACTIVE cell on an EXCEL worksheet....

splitpeanut

New Member
Joined
Apr 24, 2006
Messages
20
How do I change the default border color of the active cell I’m working in, on any worksheet? (or background color)
I’d like to be able to locate the active cell without having to search for the slightly highlighted border of the active cell on any worksheet….

Thanks,
Jon
 

Some videos you may like

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,764
This is the easy bit - changing the border on the active cell

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With ActiveCell.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlThick
        .ColorIndex = 3
    End With
    With ActiveCell.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlThick
        .ColorIndex = 3
    End With
    With ActiveCell.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlThick
        .ColorIndex = 3
    End With
    With ActiveCell.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlThick
        .ColorIndex = 3
    End With

End Sub

The more difficult bit is clearing the border on the previous active cell.

On 2nd thoughts, you're probably better off downloading the cell-spotter addin from http://www.andrewsexceltips.com/Cell_Spotter.zip
 

Watch MrExcel Video

Forum statistics

Threads
1,108,633
Messages
5,523,995
Members
409,555
Latest member
TIPSAREA

This Week's Hot Topics

Top