View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Cell interior color

John

You could download Chip Pearson's ROWLINER add-in from

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

Or use event code

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 = 3
Set OldCell = Target
End Sub

Note: this is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste into that module.

If not what you're looking for, post back.


Gord Dibben MS Excel MVP

On Thu, 12 Oct 2006 03:13:02 -0700, johnb
wrote:

How do change a cell's interior color when a first gets the focus and when it
losses the focus. In other words when I first click on a cell is changes
color and when I click elsewhere it change color.

TIA
johnb


Gord Dibben MS Excel MVP