- Home
·
- String Manipulation
·
- This piece of code makes sure that the first letter of each word is a capital - useful in validatio
This piece of code makes sure that the first letter of each word is a capital - useful in validatio
This piece of code makes sure that the first letter of each word is a capital - useful in validation checks for names etc.. Handy code!
API Declarations
'Created By Jason age 16
' here is one of my first progs!
Rate This piece of code makes sure that the first letter of each word is a capital - useful in validatio
(1(1 Vote))
'a command button called command1
'copy and paste the following code!
Private Sub Command1_Click()
For n = 1 To Len(Text1.Text)
If n = 1 Then
If Asc(Mid$(Text1.Text, n, 1)) < 65 Or Asc(Mid$(Text1.Text, n, 1)) > 90 Then
MsgBox ("Something wrong!")
End If
End If
If spacefound = True Then
If Asc(Mid$(Text1.Text, n, 1)) < 65 Or Asc(Mid$(Text1.Text, n, 1)) > 90 Then
MsgBox ("Something wrong!")
End If
End If
If Asc(Mid$(Text1.Text, n, 1)) = 32 Then
spacefound = True
Else
spacefound = False
End If
Next n
End Sub
This piece of code makes sure that the first letter of each word is a capital - useful in validatio Comments
No comments yet — be the first to post one!
Post a Comment