0

I made a simple function to validate the user's input.

Function isNumber(sen As String)
Do Until Val(i) = CDbl(Val(i)) And IsNumeric(i) And i <> ""
      i = Application.InputBox(sen)
Loop
End Function

then used the following to call the function:

Public Sub test()
testing = isNumber("test")
Debug.Print (testing)
End Sub

For some reasons, no value is being returned. i.e., nothing in the immediate window.

0 Answers0