Validating numeric textbox in vb net

Then, we'll demonstrate how you can use validation techniques to prevent bad data from being entered into your application in the first place.

Hi Lexi85, According to your description, as far as I know, the best way to validate phone number is regular expression. Here is a sample of validate America phone number, if you have some other phone number format, please provide specific format.

Sample Format(XXX-XXXXXXX): Sample Code: MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue.

Text = Format Currency("123456789", , , , vb True) If Me.

Refresh() End Sub Private Sub XText Box_Key Down(By Val sender As Object, By Val e As System.

Or perhaps you simply didn't allow for a particular rare circumstance in your code. NET Framework offers a robust set of tools for dealing with these unexpected problems.

Last modified 13-Jan-2020 07:47