Solved

Positioning cursor

Posted on 1999-01-28
3
151 Views
Last Modified: 2010-05-03
I want the cursor postioned at a certain point after text has been transferred from one window to another using the following:

Clipboard.SetText lstList1.Text
    frmOrderform.txtText2.SelText = Clipboard.GetText()
    SendKeys "{Enter}", False

This of course puts the cursor at the start of the next line but what I want is the cursor to end up 10 spaces to the right of the last character of the transferred text, as in:

12345678  Whatever           | cursor postion

I tried this using a sendkeys but dont know how to send 10 spacebar presses.
0
Comment
Question by:TrevorCharles
  • 2
3 Comments
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1471034
sendkeys "         " will do
0
 
LVL 3

Accepted Solution

by:
sduckett earned 50 total points
ID: 1471035
Slightly too simple to be obvious this one:
SendKeys "          ", False
Bye for now
0
 
LVL 3

Expert Comment

by:sduckett
ID: 1471036
mirkwood:
I hadn't seen your answer while I went offline and experimented with this, sorry.
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

Suggested Solutions

Title # Comments Views Activity
Use closed file on desktop in vba 6 65
MS Acccess - Update Field in Table when report is printed 6 43
VBA filters 2 50
vbModal 12 31
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…

914 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

20 Experts available now in Live!

Get 1:1 Help Now