this time i will show you on how to capitalize every first letter of a word in a Text box Control,
follow the codes below:
Next
capT.Text = t
End If
End If
Next capT
End Sub
Hope you Like it
Happy Coding
Continue Reading with Borgy's Blog »
follow the codes below:
This code will write on a module as a function just copy and paste on a module
Public capT As Object
Public Sub cap(frm As Form)
cr = vbCrLf
For Each capT In frm.Controls
If TypeOf capT Is vkTextBox Then
t = capT.Text
If t <> "" Then
Mid$(t, 1, 1) = UCase$(Mid$(t, 1, 1))
For i = 1 To Len(t) - 1
If Mid$(t, i, 2) = cr Then Mid$(t, i + 2, 1)
Public Sub cap(frm As Form)
cr = vbCrLf
For Each capT In frm.Controls
If TypeOf capT Is vkTextBox Then
t = capT.Text
If t <> "" Then
Mid$(t, 1, 1) = UCase$(Mid$(t, 1, 1))
For i = 1 To Len(t) - 1
If Mid$(t, i, 2) = cr Then Mid$(t, i + 2, 1)
= UCase$(Mid$(t, i + 2, 1))
If Mid$(t, i, 1) = " " Then Mid$(t, i + 1, 1)
= UCase$(Mid$(t, i + 1, 1))If Mid$(t, i, 1) = " " Then Mid$(t, i + 1, 1)
Next
capT.Text = t
End If
End If
Next capT
End Sub
Hope you Like it
Happy Coding
0 Comments