View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
robnsd robnsd is offline
external usenet poster
 
Posts: 13
Default replicate feel of checkbox

My question is- is there a way to replicate the feel of a checkbox
within an
excel cell where one click on the cell sets the cell to a certain
value , say
"X", and another click on the cell sets it to a different value, say
"" .

I've received direction (below) on how to do this with a single
column, but I need to do it with two noncontiguous columns (column C
and H but not the columns in between)


Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Intersect(Columns("B:B"), Target) Is Nothing Then Exit Sub
If Target.Count 1 Then Exit Sub
If Target.Value = "" Then
Target.Value = "X"
Else
Target.Value = ""
End If

End Sub

Any help would be appreciated.

Thanks,

Robert