Check if string entered is a Number- VB.NET

Tags: VB.NET, VB 2008, VB 2010, VB 2012, VB 2013

The following code checks if a string entered is a number (hex 0 - 9 - A - F)

If Char.IsNumber(TextBox1.Text.Chars(TextBox1.TextLength - 1)) = True Then

        Else

            MsgBox("Numbers Only")

End If


Share This

Home | About | Contact | Privacy Policy

Copyright visual-basic-tutorials.com 2017 - All Rights Reserved.