correct.
check length of textbox, if current textbox length is > 0 then check to see if the text entered is numeric (using Char.IsNumber or Char.IsDigit) and if it is, finally proceed to do some calc.
example:
Dim theValue as Double
If Me.textbox1.Text.Length > 0 then
if Double.TryParse(Me.textbox1.Text, theValue) = false then
'error, the value entered in the textbox is not double value
end if
end if
this would be some code which will do the above stated
|