Private
Sub
Worksheet_BeforeDoubleClick(
ByVal
Target
As
Range, Cancel
As
Boolean
)
Unprotect Password:=
""
Cancel =
True
If
Target.Column <= 6
Then
If
Not
IsEmpty(Target.Value)
Then
If
IsNumeric(Target.Value)
Then
If
UCase(Cells(Target.Row, 7).Value) =
"X"
Then
If
Target.Font.ColorIndex <> 16
Then
Target.Font.ColorIndex = 16
ElseIf
Target.Font.ColorIndex = 16
Then
Target.Font.ColorIndex = xlAutomatic
End
If
Else
MsgBox
"Bitte die Zeile markieren."
End
If
End
If
End
If
ElseIf
Target.Column = 8
Then
If
Not
IsEmpty(Target.Value)
Then
If
IsNumeric(Target.Value)
Then
If
UCase(Cells(Target.Row, 7).Value) =
"X"
Then
If
Target.Font.ColorIndex <> 16
Then
Target.Resize(1, 3).Font.ColorIndex = 16
ElseIf
Target.Font.ColorIndex = 16
Then
Target.Resize(1, 3).Font.ColorIndex = xlAutomatic
End
If
Else
MsgBox
"Bitte die Zeile markieren."
End
If
End
If
End
If
End
If
Protect Password:=
""
End
Sub