Results 1 to 4 of 4

Thread: Forcing Capitals

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    5

    Smile

    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

  2. #2
    Guest
    Use the StrConv function.
    Code:
    Private Sub Text1_Change()
        Text1 = StrConv(Text1, vbProperCase)
    End Sub

  3. #3
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    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."

  4. #4
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    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
  •  



Click Here to Expand Forum to Full Width