right click your sheet tab, view code and paste this in. It works for a1 -
A10 so change to suit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
If IsEmpty(Target) Then
With Target
.Font.Name = "marlett"
.Value = "a"
End With
Else
Target.Value = ""
End If
End If
End Sub
The only problem with using SelectionChange is you have to move focus to
another cell and then back again to correct a mistaken entry. Perhaps the OP
would consider double-clicking a cell to toggle the checkmark; that way,
focus could remain in the same cell and double clicking a second time could
reverse a mistaken entry. Using your code as a guide ('touchngo'... install
it the same way as Mike told you for his code)...
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
Cancel = True
If IsEmpty(Target) Then
With Target
.Font.Name = "marlett"
.Value = "a"
End With
Else
Target.Value = ""
End If
End If
End Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.