I've follow this tutorial
http://theclosetentrepreneur.com/how...click-in-excel

Its pretty much easy to follow. Now.. I am trying to figure out how to code in Value 1 and Null every time I double click on cell. ( i.e. *double click* value = 1 appears on cell; *double click* nothing show in cell)

I've started this code.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

 If Target Then
    Target = vbNullString
 Else
  Target = 1
 End If
    
Cancel = True
End Sub
I am not get anything... No double click but a blinking crusor. What am I missing here. Please help