I have trawled the internet looking for a solution to this. I had it working and now it is playing up and not recognising anything as a number.
Sub NumericValuesOnly()
'Ensure commodities are entered as numbers
If Not IsNumeric(tbPcsNo.Value) Then
MsgBox "Use numbers for quantity", vbCritical
Exit Sub
Else
End If
If Not IsNumeric(tbUnit.Value) Then
MsgBox "Use numbers for quantity", vbCritical
Exit Sub
Else
End If
If Not IsNumeric(tbWeight.Value) Then
MsgBox "Use numbers for quantity", vbCritical
Exit Sub
Else
End If
If Not IsNumeric(tbLtr.Value) Then
MsgBox "Use numbers for quantity", vbCritical
Exit Sub
Else
End If
If Not IsNumeric(tbValue.Value) Then
MsgBox "Use numbers for quantity", vbCritical
Exit Sub
Else
End If
End Sub
Any help would be much appreciated. Thank you.
Danny
Bookmarks