View Single Post
  #2  
Old March 13th, 2008, 03:07 PM posted to microsoft.public.excel.worksheet.functions
Gary''s Student
external usenet poster
 
Posts: 7,584
Default Active Cell Border Color

Put the following Event macro in the worksheet code area:

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


REMEMBER: the worksheet code area, not a standard module.
--
Gary''s Student - gsnu200773


"Linda Oshkosh WI" wrote:

I know this can be done, I just can remember how or seem to be able to find
it under help.

I would like the border around my active cell to be a different color so it
stands out easier than the now black border on an all black text document. I
know how to add borders to cells, but I need the active cell border than
moves to change color. Please help if you know how to do this!

Thanks.