add 1 when click
Hi Dylan
One way: Change the code to the following (now only A1 is counted):
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("A1")) Is Nothing Then
Exit Sub
Else
Target.Value = Target.Value + 1
end if
End Sub
hi Rob,
thanks for help. it works. what i see is that the whole
column will be affected. could you teach me how to amend
the script for only a particular Cell instead? also could
i do it such that the value change On_click instead of
clicking elsewhere then back on the cell. thanks very much.
|