Results 1 to 5 of 5

Thread: how do I trim 1 character from the left????? (VERY EZ)

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    how do I trim 1 character from the left of a text box?
    NXSupport - Your one-stop source for computer help

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264
    text1.text=right (text1.text,len(text1.text)-1)

    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    after that, how do I get it so that it brings the focus to the end again? (with out using send keys)
    NXSupport - Your one-stop source for computer help

  4. #4
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264
    Private Sub Command1_Click()
    Text1.Text = Right(Text1.Text, Len(Text1.Text) - 1)
    Text1.SelStart = Len(Text1.Text)
    Text1.SetFocus
    End Sub
    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

  5. #5
    Lively Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    88
    Not much different from asabi, but trim method
    Code:
    Private Sub Command1_Click()
        Text1.Text = Mid$(Text1, 2)
        Text1.SelStart = Len(Text1)
        Text1.SetFocus
    End Sub

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