Option
Explicit
Private
Sub
Worksheet_BeforeDoubleClick(
ByVal
target
As
Range, Cancel
As
Boolean
)
If
Intersect(Columns(
"Q"
), target)
Is
Nothing
Then
Exit
Sub
Doit target
Cancel =
True
End
Sub
Private
Sub
Worksheet_BeforeRightClick(
ByVal
target
As
Range, Cancel
As
Boolean
)
If
Intersect(Columns(
"Q"
), target)
Is
Nothing
Then
Exit
Sub
Doit target
Cancel =
True
End
Sub
Private
Sub
Doit(target)
Dim
c
As
Range
Set
c = target.Offset(, 6)
Application.EnableEvents =
False
If
VarType(c.Value) = 5
Then
Select
Case
Int(c.Value)
Case
Is
< 2, 6
c.Value = 2
Case
Else
c.Value = c.Value + 1
End
Select
End
If
Application.EnableEvents =
True
End
Sub