Hallo zusammen,
für Euch bestimmt einfach - für mich nicht:
Folgende Aufgabe:
wenn die linke Maustaste einfach in einer Zelle gedrückt wird soll in dieser Zelle wechselnd: x, a, oder zelle leer eingetragen werden.
Doppelklick habe ich hinbekommen so:
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim RaBereich_1 As Range
Set RaBereich_1 = Range("B4:B13")
Application.EnableEvents = False
Cancel = True
' Zelle ändern
If Target.Value = "" Then
Target.Value = "a"
GoTo Ende
End If
If Target.Value = "a" Then
Target.Value = "x"
GoTo Ende
End If
If Target.Value = "x" Then
Target.Value = ""
GoTo Ende
End If
Ende:
Application.EnableEvents = True
Set RaBereich_1 = Nothing
End Sub
Einfachklick habe ich nicht geschafft.
Bin für jeden Tipp dankbar.
Beste Grüße
Thunderstruck
|