Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I want to change the active cell border colour to red. I foundthe following code on the net but as a total newbie to VBA in excel I haven't got a clue where to put it or how to use it. Can somebody please help. 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 TIA Dynamo |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Active Cell Border Color | Excel Worksheet Functions | |||
active cell border color | Excel Discussion (Misc queries) | |||
Change cell selection border color in excel to stand out more? | Excel Worksheet Functions | |||
On a Mac how do I change the border colour of the active cell? | Excel Discussion (Misc queries) | |||
How to change the default Border, Font Color, and Cell Color | Excel Discussion (Misc queries) |