Put your number in to string variable eg A$
Use the following code to test the length of the string
If Len(A$) <>10 Then
MsgBox ("Incorrect number")
'Do something else to make your user re-enter the number
End If
Once added to your code the user will only be able to proceed when the
variable is ten characters long. Note - this will only check for string
length not validity, so letters and numbers can both be used, you will need
to add seperate validation for those.
HTH
Neil
www.nwarwick.co.uk
"Tempy" wrote:
> Good day,
> I am requesting the user to enter a ten digit number into the input box
> and would like to test this and if not ten digits, then they must
> re-enter.
> Could somebody please help me with this, im sure simple code.
>
> thanks in advance
>
> Tempy
>
> *** Sent via Developersdex http://www.developersdex.com ***
>
Bookmarks