T
taco
Hi everyone;
On my worksheet, users can enter data on E6:J185 range. and C3 cell is
counting down from 4.500 the total entered amount. What I would like to do
is, while users are entering data, if C3's value is getting smaller than
zero, code should warn them and prevent further data entry. Here is my
unsuccesful code;
Dim OldValue As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
If (c3) < 0 Then
On Error GoTo Whoops
Application.EnableEvents = False
MsgBox "You Don’t Have Enough Points!"
Target.Value = OldValue
End If
Whoops:
Application.EnableEvents = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If (c3) < 0 Then OldValue = Target.Value
End Sub
Thanks a lot in advance for your time and help.
Regards.
On my worksheet, users can enter data on E6:J185 range. and C3 cell is
counting down from 4.500 the total entered amount. What I would like to do
is, while users are entering data, if C3's value is getting smaller than
zero, code should warn them and prevent further data entry. Here is my
unsuccesful code;
Dim OldValue As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
If (c3) < 0 Then
On Error GoTo Whoops
Application.EnableEvents = False
MsgBox "You Don’t Have Enough Points!"
Target.Value = OldValue
End If
Whoops:
Application.EnableEvents = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If (c3) < 0 Then OldValue = Target.Value
End Sub
Thanks a lot in advance for your time and help.
Regards.