This is my code on vba for a excel sheet:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Value < "0" Then
MsgBox ("testing")
End If
End Sub
It works but only when I manually click on a cell and change a value to negative. What I want is whenever any value on any sheet gets decremented to a negative number it pops up a msg warning me that a cell value is < 0. For example, if I request for 10 items in my inventory and I only have 9 quantity, the quantity which =sum(quantity - request) becomes negative and a popup msg will appear. The code up there doesn't really work, anyone know a way around this?
Bookmarks