Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
Dim
xFr
As
String
Dim
xHr
As
String
Dim
xWSName
As
String
xFr =
"F7:F31"
xHr =
"H7:H31"
xWSName =
"Ueberblick"
xF =
"F5"
xH =
"H5"
If
Intersect(Target, Range(
"F7:F31"
))
Is
Nothing
Then
Exit
Sub
If
IsEmpty(Target)
Then
Exit
Sub
xNumF = (Sheets(xWSName).Range(xF).Value)
If
(Target.Value) > (Sheets(xWSName).Range(xF).Value)
Then
MsgBox Prompt:=
"Die eingegebene Punktzahl ist größer als die Maximalpunktzahl, bitte überprüfen! "
, Title:=
"WARNUNG"
If
Intersect(Target, Range(
"H7:H31"
))
Is
Nothing
Then
Exit
Sub
If
IsEmpty(Target)
Then
Exit
Sub
xNumH = (Sheets(xWSName).Range(xH).Value)
If
(Target.Value) > (Sheets(xWSName).Range(xH).Value)
Then
MsgBox Prompt:=
"Die eingegebene Punktzahl ist größer als die Maximalpunktzahl in H, bitte überprüfen! "
, Title:=
"WARNUNG"
End
If
End
If
End
Sub