Solved

Add and move to the end of a string

Posted on 2003-12-01
2
182 Views
Last Modified: 2010-05-01
Hi,

   Maybe this is a stupid question but i have a mental cloud , The problems is:

   I have a text box with a predefined text or not, what i need is to add a text to the text box and move the cursor to the end of this text box to let the user type the rest.

   txtboz1 = "1234567"

   I want to add 8901234 if the user press the key "/" keyascii 47 and let the user put any other text at the end of this one .

  I was trying with the sendkeys command but when i send the text and the "{END}" all the text becomes selected and the cursor is not at the end of the text box.

Any idea?
Thanks a lot
0
Comment
2 Comments
 
LVL 19

Accepted Solution

by:
Rimvis earned 25 total points
ID: 9850128
Is this what you want?

    Text1 = Text1 & "yOURtEXT"
    Text1.SelStart = Len(Text1)
    Text1.SetFocus
0
 
LVL 12

Author Comment

by:Alfredo Luis Torres Serrano
ID: 9850178
Yes man thanks a lot
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question