Tick box
That turns it on and off ok. Thanks.
I had already changed A to M but, the code works to the right of the cell
double clicked.
Thanks
Jock
" wrote:
Hi
1. Did you try changing the A to an M??!
2. For the deselect you could try
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
Dim myRow As Range
If Not Intersect(Target, ActiveSheet.Columns("M")) Is Nothing Then
Set myRow = Target.Resize(, 26)
With myRow
If .Borders(xlEdgeTop).Color = RGB(255, 0, 0) then
.Borders.LineStyle = xlnone
Else
.Borders.Color = RGB(255, 0, 0)
.Borders(xlInsideVertical).Color = RGB(255, 255, 255)
End If
End With
End If
'Cancel = True
End Sub
regards
Paul
On May 11, 3:02 pm, Jock wrote:
Hi Paul,
Excellent stuff.
However, My column is 'M' and the bordered area is from 'M' to 'AL' rather
than 'A' - 'Z'. Can that be adapted?
Also, I'd like to be able to double click a second time to "de-border" the
cells.
I don't know if this is poss, but all help greatly appreciated.
Thanks,
Jock
|