change highlight color on active cells

G

Gord Dibben

Louis

Only though VBA.

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Static OldCell As Range
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
End If
Target.Interior.ColorIndex = 6 'yellow
Set OldCell = Target
End Sub

This is sheet event code.

Right-click on the sheet tab and "View Code". Copy and paste into that
module.

Chip Pearson has a great add-in named Rowliner.xla that will make the
highlighting available for all sheets and workbooks.

The code above was cribbed from Chip to start with.

http://www.cpearson.com/excel/RowLiner.htm


Gord Dibben Excel MVP
 

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