View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Sandy Mann Sandy Mann is offline
external usenet poster
 
Posts: 2,345
Default Insert a Checkmark

This will toggle the X on and off:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Change Range("B2:B50") to the range that you want
If Intersect(Target, Range("B2:B50")) Is Nothing Then Exit Sub
If Target.Value = "X" Then
Target.Value = ""
Exit Sub
End If
Target.Value = "X"
End Sub

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"scott" wrote in message
...
how would you set up this same procedure to toggle between "" and "X"?


"Sandy Mann" wrote:

Right-click on the sheet tab that you want to use and select the sheet
tab
name in the VBA Project window. Ensure that the main window has
Worksheet
at the top thencopy and paste this code into the Sheet Module:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Change Range("B2:B50") to the range that you want
If Intersect(Target, Range("B2:B50")) Is Nothing Then Exit Sub

Target.Value = "X"
End Sub

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Mac 5430" wrote in message
...
How do I insert a "X" in a cell by single left clicking on a cell, a
"X"
will apear. I have a dozen different forms on seperate tabs in one
file
with
many question that need to be answered by a left click on a cell (to
save
time). The cells are in different rolls and columns and tabs

I am not very excel savey

Mac