Highlighting Active Cell? How?

S

skint

Hi all

When I have lists in excel numbers down the left and numbers across the
top, is it possible for the active cell i.e say 5 down and 4 across to
be highlighted when that cell is selected?
If so how?

Many thanks
 
B

Bob Phillips

'----------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'----------------------------------------------------------------
Cells.FormatConditions.Delete
With Target
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 36
End With
End Sub


'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 
P

Paul B

skint, you may also want to look at Chip's row liner addin here
http://www.cpearson.com/excel/RowLiner.htm

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
Top