Results 1 to 5 of 5

Thread: how can you make some text in text box to all capitals?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Posts
    139

    Smile how can you make some text in text box to all capitals?

    how can you make some text in text box to all capitals?
    i mean acustomet types in something but you want it to be all in capitals

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Posts
    139

    Re: how can you make some text in text box to all capitals?

    i meant an input box
    if the customer types in input box

  3. #3
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: how can you make some text in text box to all capitals?

    When the user leave teh textbox, you can use the LostFocus event to convert the text to CAPS.

    VB Code:
    1. Private Sub TextBox1_LostFocus()
    2.     TextBox1.Text = UCase(TextBox1.Text)
    3. End Sub
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Posts
    139

    Re: how can you make some text in text box to all capitals?

    but its an input box

  5. #5
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: how can you make some text in text box to all capitals?

    Here is the code for a form that looks like an inputbox. You can add the following to make it do what you want.

    VB Code:
    1. Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
    2.  
    3.     Text1.Text = UCase(Text1.Text)
    4.     Text1.SelStart = Len(Text1.Text)
    5.    
    6. End Sub
    Attached Files Attached Files

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