The following code will write/clear "a" in a cell, but it leaves the insertion point in the cell. I've tried adding SendKeys "{ESC}" but to no effect. Any other suggestions?
[VBA]Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Count > 1 Then Exit Sub
If Target.Value <> "a" Then
Target.Value = "a" 'Sets target Value = "a"
Exit Sub
End If
If Target.Value = "a" Then
Target.ClearContents 'Sets Target Value = ""
Exit Sub
End If
End Sub
[/VBA]