Option
Explicit
Private
mstrText
As
String
Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
With
Target
If
.Address = Cells(1, 1).Address
Then
Application.EnableEvents =
False
If
MsgBox(
"Bist du sicher das du die Sorte ändern möchtest?"
, vbYesNo + vbCritical,
"Warnung!"
) = vbNo
Then
.Value = mstrText
Else
mstrText = .Value
End
If
Application.EnableEvents =
True
End
If
End
With
End
Sub
Private
Sub
Worksheet_SelectionChange(
ByVal
Target
As
Range)
With
Target
If
.Address = Cells(1, 1).Address
Then
mstrText = .Value
End
With
End
Sub