How do I capitalize the first word a sentence, is there a built in function to take care of it, or what?
Printable View
How do I capitalize the first word a sentence, is there a built in function to take care of it, or what?
here one that will capitalize the first word in a text box. Is this what you want or something else?
Private Sub Command1_Click()
m$ = Left(Text1.Text, 1)
c$ = UCase(m$)
i$ = Replace(Text1.Text, m$, c$)
Label1.Caption = i$
End Sub
There is probably a million was to do this but i felt a
bit creative so i went with this.
Private Sub Command1_Click()
Dim orgmessage As String
Dim newmessage As String
Dim capletter As String
orgmessage = "hello my name is brandon"
capletter = UCase(Left(orgmessage, 1))
newmessage = Mid(orgmessage, 2, Len(orgmessage))
Picture1.Print orgmessage
Picture1.Print (capletter + newmessage)
End Sub
Text1 = StrConv(Text1, vbProperCase)
This Will Capitalize The First Letter Of Every Word In The Sentence.Quote:
Originally posted by d.paulson
Text1 = StrConv(Text1, vbProperCase)
Yea Some People Don't Bother to READ!!Quote:
Originally Posted by ;161035