Results 1 to 6 of 6

Thread: [RESOLVED] [word]How to find the cursor position..

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2008
    Posts
    44

    Resolved [RESOLVED] [word]How to find the cursor position..

    Hi,
    How to find the cursor position in the TextBox....

    Thanks in advance

  2. #2
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    Re: [word]How to find the cursor position..

    Code:
    TextBox1.SelStart
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • If your question was answered please use Thread Tools to mark your thread [RESOLVED]
    • Don't forget to RATE helpful posts

    • Baby Steps a guided tour
    • IsDigits() and IsNumber() functions • Wichmann-Hill Random() function • >> and << functions for VB • CopyFileByChunk

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2008
    Posts
    44

    Re: [word]How to find the cursor position..

    Is working fine,
    How to insert the Text in Textbox where the cursor position blinks.

    Thanks in advance

  4. #4
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    Re: [word]How to find the cursor position..

    With i = TextBox1.SelStart, split TextBox1.Text into 2 parts at position i using Left() and Mid(), join them together with AddedText in the middle.
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • If your question was answered please use Thread Tools to mark your thread [RESOLVED]
    • Don't forget to RATE helpful posts

    • Baby Steps a guided tour
    • IsDigits() and IsNumber() functions • Wichmann-Hill Random() function • >> and << functions for VB • CopyFileByChunk

  5. #5

    Thread Starter
    Member
    Join Date
    Apr 2008
    Posts
    44

    Re: [word]How to find the cursor position..

    Its working fine anhn.

  6. #6

    Thread Starter
    Member
    Join Date
    Apr 2008
    Posts
    44

    Re: [RESOLVED] [word]How to find the cursor position..

    Is working fine.
    Code:
    TextBox1.Text = Left(TextBox1.Text, TextBox1.SelStart) & ChrW(8211) & Mid(TextBox1.Text, TextBox1.SelStart + 1, Len(TextBox1.Text))

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