A
art
Hello all:
I have the following vba code, but it seems I have to many or too little
"else" or "End If". Please help me..
The code is as follows:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Dim MyOption As Long
If Target.Cells.Count > 1 Then Exit Sub
Cancel = True 'stop editing in cell
If MyOption = 1 Then
If ActiveCell.Value <= 1 Then
ActiveCell = ""
Else
If IsNumeric(Target.Value) Then
ActiveCell.Value = ActiveCell.Value - 1
End If
Else
If IsNumeric(Target.Value) Then
Target.Value = Target.Value + 1
End If
End Sub
I have the following vba code, but it seems I have to many or too little
"else" or "End If". Please help me..
The code is as follows:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Dim MyOption As Long
If Target.Cells.Count > 1 Then Exit Sub
Cancel = True 'stop editing in cell
If MyOption = 1 Then
If ActiveCell.Value <= 1 Then
ActiveCell = ""
Else
If IsNumeric(Target.Value) Then
ActiveCell.Value = ActiveCell.Value - 1
End If
Else
If IsNumeric(Target.Value) Then
Target.Value = Target.Value + 1
End If
End Sub