View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Change cell selection border color in excel to stand out more?

I think I'd use Target instead of activecell. And instead of activesheet, I'd
refer to it using the Me keyword. And declaring all the variables you use is
always a good idea.

Did you mean to post this as a followup to my response? Was it meant for the
OP?


ryguy7272 wrote:

Take a look at this:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim v As Variant
v = Array(xlEdgeBottom, xlEdgeTop, xlEdgeRight, xlEdgeLeft)
For Each r In ActiveSheet.UsedRange
With r
For i = 0 To 3
.Borders(v(i)).LineStyle = xlNone
Next
End With
Next

For i = 0 To 3
With ActiveCell.Borders(v(i))
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = 7
End With
Next
End Sub

Right-click on the tab and paste the code into the window that opens.

Regards,
Ryan---

--
RyGuy

"Dave Peterson" wrote:

You may want to try Chip Pearson's Rowliner:
http://www.cpearson.com/excel/RowLiner.htm

Jeanne wrote:

Is it possible to change the working cell border color as you move around in
your spreadsheet to find your place easily?


--

Dave Peterson


--

Dave Peterson