Results 1 to 4 of 4

Thread: Text box problem

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2001
    Location
    Scotland, UK
    Posts
    321

    Question Text box problem

    Hi

    I have a text box that changes a < to another symbol, using the Replace statement:

    Me.Text1 = Replace(Text1, "<", "§")

    However, when its run, it does what its supposed to do, but the cursor, jumps to the start of the text box. How do I stop this.

    Some1 told me to use SelStart or something similar, but I cant work out how!

    Any help would be appreciated.

  2. #2
    Member
    Join Date
    Mar 2001
    Posts
    60

    Reply

    here u go m8 u were almost there

    '//code
    Me.Text1 = Replace(Text1, "<", "§")
    'Starts at the end of the textbox
    Text1.SelStart = Len(Text1.text)
    '//End of code
    What is Life? One big dream or one Big nightmere.

  3. #3
    jim mcnamara
    Guest
    To have the cursor stay where it was try:
    Code:
        i = instr(Text1.Text,"<")
        Replace(Text1.Text,"<","§") 
        Text1.SelStart = i

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2001
    Location
    Scotland, UK
    Posts
    321
    thanks guys / gals (Just to be sure)

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