C
cafe
Please help: How can I validate numbers enter by the user to ensur
they are not able to enter decimals. This code controls the range bu
not the decimals. Or is there a better way? Thank you.
Sub auto_open()
ThisWorkbook.Sheets("04 Est").OnEntry = "WatchIT"
End Sub
Sub WatchIT()
Dim isect As Excel.Range
Set isect = Application.Intersect(Range(ActiveCell.Address), _
Range("WatchEst04"))
If isect Is Nothing Then
Else
If (Val(ActiveCell.Value) < 0 _
Or Val(ActiveCell.Value) > 100) _
Or Not IsNumeric(ActiveCell.Value) Then
ActiveCell.Value = 0
MsgBox "No Decimals Please!!. Re-Entry "
End If
End Su
they are not able to enter decimals. This code controls the range bu
not the decimals. Or is there a better way? Thank you.
Sub auto_open()
ThisWorkbook.Sheets("04 Est").OnEntry = "WatchIT"
End Sub
Sub WatchIT()
Dim isect As Excel.Range
Set isect = Application.Intersect(Range(ActiveCell.Address), _
Range("WatchEst04"))
If isect Is Nothing Then
Else
If (Val(ActiveCell.Value) < 0 _
Or Val(ActiveCell.Value) > 100) _
Or Not IsNumeric(ActiveCell.Value) Then
ActiveCell.Value = 0
MsgBox "No Decimals Please!!. Re-Entry "
End If
End Su