Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Active cell/row highlighting vikingfan2108 Excel Discussion (Misc queries) 2 March 17th 10 06:31 PM
Highlighting Active Cell jpreman Excel Discussion (Misc queries) 0 January 23rd 08 01:49 AM
Highlighting the Active Row Dickie Worton Excel Discussion (Misc queries) 0 March 5th 07 05:24 PM
Highlighting Active Cell? How? skint Excel Discussion (Misc queries) 2 October 9th 06 01:06 AM
Highlighting an active cell pjy Excel Worksheet Functions 1 August 2nd 06 05:36 PM


All times are GMT +1. The time now is 02:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"