K
kara
I am using the following macro to increase the value of a cell on a double
click how. I cannot make it work for columns c,d,e,and f. Can anyone offer
any solutions?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
As Range, Cancel As Boolean)
If Target.Row = 1 Then Exit Sub
If Target.Column <> 2 Then Exit Sub 'Require Col B
On Error Resume Next
Application.EnableEvents = False
Target.Value = Target.Value + 1
Application.EnableEvents = True
If Err.Number <> 0 Then
MsgBox "Unable to add 1 to value in cell " _
& Target.Address(0, 0)
End If
End Sub
click how. I cannot make it work for columns c,d,e,and f. Can anyone offer
any solutions?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
As Range, Cancel As Boolean)
If Target.Row = 1 Then Exit Sub
If Target.Column <> 2 Then Exit Sub 'Require Col B
On Error Resume Next
Application.EnableEvents = False
Target.Value = Target.Value + 1
Application.EnableEvents = True
If Err.Number <> 0 Then
MsgBox "Unable to add 1 to value in cell " _
& Target.Address(0, 0)
End If
End Sub