Results 1 to 3 of 3

Thread: Send Keys "%" + "{F4}"

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    IL
    Posts
    39

    Post

    Private Sub CommandKilIAM_Click()
    On Error GoTo Humph
    AppActivate "Internet Answering Machine", True
    SendKeys "%" + "{F4}"
    Humph:
    End Sub

    Why does this kill not only it's target, but also the program that executes this command?

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    I don't know, but by using "+" VB may think you are adding the two strings in your SendKeys. It would be better to do it this way
    SendKeys "%{F4}"

    ------------------
    Marty
    What did the fish say when it hit the concrete wall?
    > > > > > "Dam!"

    [This message has been edited by MartinLiss (edited 02-15-2000).]

  3. #3
    Addicted Member
    Join Date
    Jul 1999
    Location
    Portland, OR.
    Posts
    226

    Post

    Try:

    Sendkeys "{%}+{F4}"

    If you use:
    "%+{F4}" it'll close your app because % with no brakets means ALT key.
    FYI: to display % as a charecter use:
    msgbox chr(37)

    Good Luck.

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