I am trying to make sure a textbox that will response to numbers ONLY and limited to 10 digits. This is what I have, It allows for 10 numbers or letters before the button is enabled:
'make sure textbox4.text is a 10 digit number
Dim length As Integer
Dim string2 As String
string2 = TextBox4.Text
length = string2.Length
If length < 10 Then Button2.Enabled = False
If length > 10 Then Button2.Enabled = False
If length = 10 Then Button2.Enabled = True
Thanks for any help
'make sure textbox4.text is a 10 digit number
Dim length As Integer
Dim string2 As String
string2 = TextBox4.Text
length = string2.Length
If length < 10 Then Button2.Enabled = False
If length > 10 Then Button2.Enabled = False
If length = 10 Then Button2.Enabled = True
Thanks for any help