ich möchte den Inhalt von mehreren Tabellenfeldern im Hintergrund berechnen und falls ein bestimmter Wert erreicht wird ein Popup Fenster (Msg-Box) mit einem Fehler ausgeben.
Wie kann ich das machen?
Gruß
Jürgen
Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
Dim x
Dim y
x = Sheets("Tabelle1").Range("A1").Value
y = 100
If x >= y And IsNumeric(x) Then
MsgBox ("Achtung! Wert " & x & " übersteigt das Limit von " & y)
End If
End Sub
Grüße,
Private Sub Worksheet_Change(ByVal Sh As Range)
Dim x, z As Long
Dim y As Long
x = Worksheets("Tabelle1").Cells(85, 10).Value
z = Worksheets("Tabelle1").Cells(86, 10).Value
y = 9
If x + z >= y And IsNumeric(x) Then
MsgBox ("Achtung! Wert " & x & " übersteigt das Limit von " & y)
End If
End Sub
Grüße und Danke