Solved

Add and move to the end of a string

Posted on 2003-12-01
2
180 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

867 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now