• VBA code for Capitalizing Each Word

    Author
    Topic
    #460807

    How to capitalize each word in a text string with VBA code?
    In the AfterUpdate event, I would like to capitalize each word (Title Case) in a textbox.
    Thanks in advance.
    Armstrong

    Viewing 0 reply threads
    Author
    Replies
    • #1166595

      Me.FirstName = StrConv(Me.txtFirstName, vbUpperCase)

      • #1166596

        Me.FirstName = StrConv(Me.txtFirstName, vbUpperCase)

        Hi Steve,
        Thanks for your quick help.
        Now the biggest question: Can a form call both macros and subprocedures?

        Armstrong

        • #1166597

          Now the biggest question: Can a form call both macros and subprocedures?

          To be more specific, in a Form, a textbox event calls a macro and a form event (say, BeforeUpdate) calls a VBA subprocedure. Is it possible?
          Armstrong

          • #1166598

            Now I’ve solved all issues.
            Yes, a form can call both macros and VBA code.
            The complete VBA code is shown in the screenshot.
            Thanks.
            Armstrong

    Viewing 0 reply threads
    Reply To: VBA code for Capitalizing Each Word

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: