Thread: Tick box
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jock Jock is offline
external usenet poster
 
Posts: 440
Default Tick box

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


" wrote:

Hi
You should be able to adapt this (for your preferred option). It runs
when you double click a cell in the first column (A).

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
Dim myRow As Range
If Not Intersect(Target, ActiveSheet.Columns("A")) Is Nothing Then
Set myRow = Target.Resize(, 26)
With myRow
.Borders.Color = RGB(255, 0, 0)
.Borders(xlInsideVertical).Color = RGB(255, 255, 255)
End With
End If
'Cancel = True
End Sub

Open the VBE and double click the sheet name you want this to work on.
Paste in this code.
Putting Cancel = True stops people editing the cell after double
clicking, which may not be what you want (so I've left it commented
out).
regrds
Paul

On May 11, 2:16 pm, Jock wrote:
Can I have a column formatted similar to a tick box which will, when a cell
is 'ticked', turn the cell red or flash red every second or have a flag (like
the prioity flag within Outlook) appear in the cell or put a red border
around the row (A-Z) in which the 'tic' box cell is in?
I actually would prefre the latter of the options if poss.
Lots to chew on there!

--
tia

Jock