|
-
Jun 14th, 2002, 10:25 PM
#1
Thread Starter
Addicted Member
Text values
If u have a txtbox where a user inputs a name u can use
If txt1.text isnumeric then
msgbox "that is not a valid name"
end if
But what is the command for text like alphanumeric is text and numbers but what is the one for just text
it doesnt like the command Isalphanumeric
thanks Trav
-
Jun 14th, 2002, 10:35 PM
#2
PowerPoster
VB Code:
Public Function IsAllString(str As String)
Dim isit As Boolean
isit = True
For i = 1 To Len(str)
If (Mid(str, i, 1) >= "A" And Mid(str, i, 1) <= "Z") Or (Mid(str, i, 1) >= "a" And Mid(str, i, 1) <= "z") Then
isit = True
Else
isit = False
Exit For
End If
Next
IsAllString = isit
End Function
Last edited by abdul; Jun 14th, 2002 at 10:39 PM.
Baaaaaaaaah
-
Jun 14th, 2002, 10:37 PM
#3
Thread Starter
Addicted Member
-
Jun 14th, 2002, 10:40 PM
#4
PowerPoster
No Problem. I just reread your post and noticed that you only want letters (no punctuations, numbers, etc), right? I just changed the code so that it only accepts letters "a" to "z" or "A' to "Z".
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|