Solved

Positioning cursor

Posted on 1999-01-28
3
154 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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 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…

749 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