Option
Explicit
Const
MYRANGE
As
String
=
"D5:F5"
Private
Sub
Workbook_SheetBeforeDoubleClick(
ByVal
Sh
As
Object
,
ByVal
Target
As
Range, Cancel
As
Boolean
)
If
Sh.name <>
"Tabelle"
Then
Exit
Sub
If
Target.Cells.Count > 1
Then
Exit
Sub
If
Intersect(Target, Sh.Range(MYRANGE))
Is
Nothing
Then
Exit
Sub
Cancel =
True
If
Target.Value =
""
Then
Target.Value =
"x"
Else
Target.Value =
""
End
If
End
Sub