Results 1 to 5 of 5

Thread: TextBox Help

  1. #1

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    TextBox Help

    hi
    well i want to insert text in a text a on click of a menu from the popup menu, but its not working, if i put that code in a command button it works
    n also tell me can i insert/replace text in the textbox in particular possitions.

  2. #2
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: TextBox Help

    Quote Originally Posted by hyousuf2
    hi
    well i want to insert text in a text a on click of a menu from the popup menu, but its not working, if i put that code in a command button it works
    n also tell me can i insert/replace text in the textbox in particular possitions.
    To insert/replace text in a textbox, use the string-var that holds the text, do some string-manipulations (mid$, left$ etc.) on it and set the new value for the textbox.
    For the first problem, you have to post your code, because what you described is correct, so there must be an mistake in your code. The only problem might be the "popup menu", is that the menu from the form or something else?
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  3. #3
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: TextBox Help

    To insert/replace text you have to use the .SelStart, .SelLenght and .SelText properties


    Has someone helped you? Then you can Rate their helpful post.

  4. #4

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    Re: TextBox Help

    ok the problem was from my side
    but now i jus wanna ask one question when add some text in the text box programatically the cursor goes to the first possition, i want it to remain at the end

  5. #5
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: TextBox Help

    Text1.SelStart = Len(Text1.Text)



    Has someone helped you? Then you can Rate their helpful post.

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