Quote Originally Posted by cultofcargo View Post
I have written some code to validate that a user input field contains a whole number;
Perhaps, OP wants to do like
Dim msg As String
If IsNumeric(Range("Quantity1")) Then
    If Range("Quantity1") Mod 1 <> 0 Then
         msg ="Quantity must be a whole number, to rectify this please enter a whole number in the quantity field.", vbCritical, "Operator Response Required"
    End if
Else
    msg = "Only Numbers allowed"
End if
If Len(msg) then
    msgbox msg
    Range("Quantity1").ClearContents
    Range("Quantity1").Select
End if