Change cell value between EMPTY and X when i click on the cell.
Try it this way then...
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Not Intersect(Target, Range("B1:B10")) Is Nothing Then
If Target.Value = "" Then
Target.Value = "X"
Else
Target.Value = ""
End If
End If
End Sub
--
Rick (MVP - Excel)
"Luc" wrote in message
...
Thanks guys,
But i also want to change the cell to Empty if the value is "X" and
change to "X" if it is empty (a kind of toggle)
Luc
|