Hi
I found this function here that should make the first leter of a string in capital letter but I didn't find a way to use the function correctly.
I failed to implement the function
thanks
I found this function here that should make the first leter of a string in capital letter but I didn't find a way to use the function correctly.
Code:
Public Function SentenceCase(ByVal pstrText As String) As String
If Len(pstrText) > 0 Then Mid$(pstrText, 1, 1) = UCase$(Mid$(pstrText, 1, 1))
If Len(pstrText) > 1 Then Mid$(pstrText, 2) = LCase$(Mid$(pstrText, 2))
SentenceCase = pstrText
End Function
Code:
Private Sub Text1_Change()
SentenceCase (Text1)
End Sub
Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
SentenceCase (Text1)
End Sub