Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Highlighting the active row
Bob Philips provided the code below in answer to someone's question. It
highlights the line of the active cell. This is SO useful to my team, that I want to be able to add it to any worksheet we use. 1. Is there a way to make a macro that adds code (the code below) to the active worksheet? (I would then make an addin for the group that copies in the below) 2. If not, can the below be applied easily to every sheet in a workbook? 3. If I wanted this to be part of the default workbook (Excel XP), how would I do this? Would it then be present on every sheet added? Daniel (PS, thanks Bob) _________________________________ Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.FormatConditions.Delete With Target.EntireRow .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" With .FormatConditions(1) With .Borders(xlTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = 5 End With With .Borders(xlBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = 5 End With End With .FormatConditions(1).Interior.ColorIndex = 20 End With End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Active cell/row highlighting | Excel Discussion (Misc queries) | |||
Highlighting Active Cell | Excel Discussion (Misc queries) | |||
Highlighting the Active Row | Excel Discussion (Misc queries) | |||
Highlighting Active Cell? How? | Excel Discussion (Misc queries) | |||
Highlighting an active cell | Excel Worksheet Functions |