Active Cell/Focus

  • Thread starter Thread starter Rich W.
  • Start date Start date
R

Rich W.

I was wondering if there is a buried setting in Excel that allows the cell
that has the current focus to standout.

A user would like to change a setting in Excel so that whatever cell has
focus stands out (I suggested using the name box and/or row/column
indicators, but that's not flying.)

Or, possibly, a macro . . . any one know of anything? Thanks in advance,

Rich
 
Put the following macro in the worksheet code area:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set t = Target
Cells.Interior.ColorIndex = xlNone
t.Interior.ColorIndex = 6
End Sub

It will color the ActiveCell as yellow.
 
And wipe out all other existing background colors on the worksheet at the same
time.


Gord Dibben MS Excel MVP
 
Posted before I added some code which is a bit more friendly but Chip Pearson's
RowLiner add-in is the way to go IMO.

See URL in reply by Mifty

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static OldCell As Range
If Application.CutCopyMode = 0 Then
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
OldCell.Borders.LineStyle = xlLineStyleNone
End If
Set OldCell = Target
OldCell.Interior.ColorIndex = 6
OldCell.Borders.LineStyle = xlContinuous
Else
If OldCell Is Nothing Then
Set OldCell = Target
Else
Set OldCell = Union(OldCell, Target)
End If
End If
End Sub


Gord
 

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