Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force Text Case

Status
Not open for further replies.

wizcow

Programmer
May 11, 2002
13
CA
Hi

I have users enter all uppercase text, which overfills the text boxes.

I want the force the textbox to display lowercase text with the first letter of each word uppercase.

Thanks
Tom
 
Hi,

I created a function that may help:

Public Function PCase(strName As String) As String

Dim strWork

strWork = Trim(strName)
If strWork <> &quot;&quot; then
strWork = UCase(Left(strWork, 1)) & _
LCase(Right(strWork, Len(strWork) - 1))
End If
PCase = strWork

End Function

Good Luck
- DCD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top