View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Add or Delete borders of a cell by clicking on that cell

If double click will do try the below. Select the sheet tab which you want to
work with. Right click the sheet tab and click on 'View Code'. This will
launch VBE. Paste the below code to the right blank portion. Get back to to
workbook and try out.


Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
If Target.Borders.Value = 1 Then
Target.Borders.LineStyle = xlLineStyleNone
Else
Target.BorderAround ColorIndex:=3, Weight:=xlThick
End If
Cancel = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Happy Proby" wrote:

I have a form that one must manually "circle" either "YES' OR "NO" each in
thier own cell. doesnot need to be a circle but could be a colored square
border.
Can anyone help?
Thanks
Happy Proby