+ Reply to Thread
Results 1 to 6 of 6

Selecting part text in a textbox

  1. #1
    vqthomf
    Guest

    Selecting part text in a textbox

    Hi I have been trying to select a part of a text entry into a textbox, I
    tried to use selstart etc I can remove the text but not hightlight it can
    someone show me how this can be done.
    TIA
    Charles

  2. #2
    Harald Staff
    Guest

    Re: Selecting part text in a textbox

    Hi Charles

    With TextBox1
    .Text = "Harald says cool, man"
    .SelStart = 12
    .SelLength = 4
    End With

    HTH. best wishes Harald

    "vqthomf" <[email protected]> skrev i melding
    news:[email protected]...
    > Hi I have been trying to select a part of a text entry into a textbox, I
    > tried to use selstart etc I can remove the text but not hightlight it can
    > someone show me how this can be done.
    > TIA
    > Charles




  3. #3
    vqthomf
    Guest

    Re: Selecting part text in a textbox

    I tried to doing it like this but I still can get it to select the text, if
    the user enters let say more than 5 digits I want to highlight the extra
    digits to give the user a chance to view or delete it.
    Regards
    Charles

    "Harald Staff" wrote:

    > Hi Charles
    >
    > With TextBox1
    > .Text = "Harald says cool, man"
    > .SelStart = 12
    > .SelLength = 4
    > End With
    >
    > HTH. best wishes Harald
    >
    > "vqthomf" <[email protected]> skrev i melding
    > news:[email protected]...
    > > Hi I have been trying to select a part of a text entry into a textbox, I
    > > tried to use selstart etc I can remove the text but not hightlight it can
    > > someone show me how this can be done.
    > > TIA
    > > Charles

    >
    >
    >


  4. #4
    Harald Staff
    Guest

    Re: Selecting part text in a textbox

    Did my code not work ?
    Exactly when and how do you want this to happen, are you calling the code
    from an event ? Which event ?
    Do you have some annoying messagebox prior to this action ? Don't.
    Seeing your code would help me help you.

    Best wishes Harald

    "vqthomf" <[email protected]> skrev i melding
    news:[email protected]...
    >I tried to doing it like this but I still can get it to select the text, if
    > the user enters let say more than 5 digits I want to highlight the extra
    > digits to give the user a chance to view or delete it.
    > Regards




  5. #5
    vqthomf
    Guest

    Re: Selecting part text in a textbox

    Harald I do have a message explaining that the user has entered more or less
    than 5 digits but I also wanted to highlight the part that is extra.
    Charles

    "Harald Staff" wrote:

    > Did my code not work ?
    > Exactly when and how do you want this to happen, are you calling the code
    > from an event ? Which event ?
    > Do you have some annoying messagebox prior to this action ? Don't.
    > Seeing your code would help me help you.
    >
    > Best wishes Harald
    >
    > "vqthomf" <[email protected]> skrev i melding
    > news:[email protected]...
    > >I tried to doing it like this but I still can get it to select the text, if
    > > the user enters let say more than 5 digits I want to highlight the extra
    > > digits to give the user a chance to view or delete it.
    > > Regards

    >
    >
    >


  6. #6
    Harald Staff
    Guest

    Re: Selecting part text in a textbox

    Sure, go a head, highlight the extra parts. My code sample showed you how to
    do it.

    Best wishes Harald



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1