|
-
Sep 10th, 2000, 06:20 PM
#1
Thread Starter
New Member
Hi I am creating a payroll at the moment and am stuck on a problem.
When the user creates a new person I want to make sure that the first Character in the name is a Capital. Not sure how to do this.
Any help would be appreciated
Thanks
-
Sep 10th, 2000, 06:25 PM
#2
Use the StrConv function.
Code:
Private Sub Text1_Change()
Text1 = StrConv(Text1, vbProperCase)
End Sub
-
Sep 10th, 2000, 06:29 PM
#3
Hyperactive Member
not sure if theres a better (easier) way of doing it but:
Code:
Dim myName As String
myName = "sajendra"
myName = UCase$(Left(myName, 1)) + Right$(myName, Len(myName) - 1)
MsgBox myName
"People who think they know everything are a great annoyance to those of us who do."
-
Sep 10th, 2000, 06:30 PM
#4
Hyperactive Member
Heh, Megatron posted a better answer and faster too. Why am I not surprised.
"People who think they know everything are a great annoyance to those of us who do."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|