check for numeric value function (easy point)
Posted on 2007-03-23
i need to create a function that will take the value of a text box and check if it is a numeric field or not.
if it is number then no problem, but if on the other hand is text then warm the user.
i have something like this but it gives me the message box twice?
any help would be appreciated.
Public Shared Function NumberField(ByVal Extension As String) As String
Dim number As String
If IsNumeric(Extension) = True Then
number = Extension
number = MsgBox("you must enter a numeric value.", "Entry Error")