Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: sendkey

  1. #1
    Guest

    Default

    excuse my english!!!

    if sendkey allow to send key to active window as from keyboard, why using sendkeys as the bolow example (in a Excel module)

    SendKeys "%F", True
    SendKeys "{DOWN}", True
    SendKeys "{ENTER}", True
    SendKeys "ciao", True

    the fourth row don't write ciao in the fileopen window?

    I think but I'm not sure that active window is excel as for row number 1, 2 and 3; and it remain for row number 4 instead of open file windows.

    Thank for your time.

    Simone

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Calgary Canada
    Posts
    222
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi,
    about your question:
    I had a problem like it but when I put this code before "sendkey", it worked. put this code before line 4:
    ''''''''''''''''''''''''
    AppActivate Return_Value
    SendKeys "ciao", True
    '''''''''''''''''''''''''''
    where "Return_Value" is a Double representing the program's task ID.("Shell", returns this ID,if successful)
    also I think you want open a file. if it is true, why do you use Ctrl+O?
    SendKeys "^{O}", True

    Good Luck
    Hamid

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    SRC
    Posts
    165
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    This is a much better way to oen a file

    Sub xcxcx()

    ss = Application.GetOpenFilename("ciao (*.xls),*.xls")
    MsgBox ss
    End Sub

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •