hugh1994
05-19-2014, 01:01 AM
I need the following If function to not recognise letters or any other characters as values > 0, and if any values that are not numbers > 0 are put in the input box, for the MsgBox to appear, but their is no Dim that exists to do this, so how can I?
Thanks.
Do
Dim Span As String ' not sure what dim to have here (non work for what i want to do)
Span = InputBox("Enter the Length of the Beam", "(mm)")
If (Span > 0) Then
[B4].Value = Span
Exit Do
Else
[A2].Value = nil2
MsgBox ("The beam length you entrered is not valid. Please input a new beam length")
End If
Loop While [A2].Value = nil2
Thanks.
Do
Dim Span As String ' not sure what dim to have here (non work for what i want to do)
Span = InputBox("Enter the Length of the Beam", "(mm)")
If (Span > 0) Then
[B4].Value = Span
Exit Do
Else
[A2].Value = nil2
MsgBox ("The beam length you entrered is not valid. Please input a new beam length")
End If
Loop While [A2].Value = nil2