by Mark (a.k.a. Aldinator) (1 Submission)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 4th November 2002
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
This code turns any variable into Sentence Case
Dim temp as string
dim q as integer
temp = text1.text
For q = st To st + sl
If Mid(temp, q, 1) = " " Then
Mid(temp, q + 1, 1) = UCase(Mid(temp, q + 1, 1))
ElseIf q = 1 Then
Mid(temp, 1, 1) = UCase(Mid(temp, 1, 1))
End If
Next q
text1.text = temp
end sub