Hello everyone,
I found a Code for VBA to use double click in certain cell to activate Yes and No. However, I cannot to add to that code that it also show blank (or returns to the default result aka do not show anything).
Can anyone help me please?
P.s I am newbie.
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address <> "C1" Then Exit Sub
Cancel = True
With Target
If .Value = "Yes" Then
.Value = "No"
Else
.Value = "Yes"
End If
End With
End Sub
I found a Code for VBA to use double click in certain cell to activate Yes and No. However, I cannot to add to that code that it also show blank (or returns to the default result aka do not show anything).
Can anyone help me please?
P.s I am newbie.
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address <> "C1" Then Exit Sub
Cancel = True
With Target
If .Value = "Yes" Then
.Value = "No"
Else
.Value = "Yes"
End If
End With
End Sub