Option
Explicit
Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
Dim
tRow
As
Long
tRow = Target.Row
Application.EnableEvents =
False
If
Target.Column = 7
And
Range(
"A"
& tRow).Value <>
""
Then
If
MsgBox(
"Eines der beiden Pflichtfelder -vorhanden- oder -liefern- "
& _
"ist nicht ausgefüllt. Soll der Artikel geliefert werden?"
, _
vbYesNo + vbQuestion) = vbYes
Then
Range(
"E"
& tRow).Value =
"x"
Range(
"D"
& tRow).ClearContents
Range(
"G"
& tRow).
Select
Else
Range(
"D"
& tRow).Value =
"x"
Range(
"E"
& tRow).ClearContents
Range(
"G"
& tRow).
Select
End
If
End
If
Application.EnableEvents =
True
End
Sub