Results 1 to 3 of 3

Thread: How do I send a program multiple TAB keypresses ?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    25

    Post

    How do I send a program multiple TAB keypresses?

    I am trying to imediately have my program refer to the parent of a 3rd party program and send instantly four TABS at once so the fourth text box with the fourth Tabstop will have the focus. How can I accomplish this.

    ps I would have used the textbox's hWnd, but for the life of me I can not get to it.

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Try this:
    Code:
    Private Sub Command1_Click()
        SendKeys "{TAB 4}", 1
    End Sub
    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Certified AllExperts Expert

  3. #3
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    Post

    Hi.

    Before using Sendkeys you would need to give the 3rd party program the focus:
    Code:
    Private Sub Command1_Click()
        AppActivate "3rd party program" 'This statement is Case-Sensitive
        SendKeys "{TAB 4}", 1
    End Sub
    All the best.


    ------------------
    OneSource
    The truth may be out there, but it's in here too!
    .

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