Results 1 to 6 of 6

Thread: [Resolved] Sending "{space}" with SendKeys?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    12

    Resolved [Resolved] Sending "{space}" with SendKeys?

    So if I use
    VB Code:
    1. SendKeys "{space}"
    I get this error: Run-time error '5': Invalid procedure call or argument.

    Well, it works fine with like "text" or "{enter}", just not with space.

    Can anyone help? =)

    Thanks!
    Last edited by zl0h; Aug 2nd, 2006 at 04:49 AM.

  2. #2
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: Sending "{space}" with SendKeys?

    Just use
    VB Code:
    1. SendKeys " "
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  3. #3
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: Sending "{space}" with SendKeys?

    The only allowed values in {} are

    Code:
    BACKSPACE	{BACKSPACE}, {BS}, or {BKSP}
    BREAK	{BREAK}
    CAPS LOCK	{CAPSLOCK}
    DEL or DELETE	{DELETE} or {DEL}
    DOWN ARROW	{DOWN}
    END	{END}
    ENTER	{ENTER}or ~
    ESC	{ESC}
    HELP	{HELP}
    HOME	{HOME}
    INS or INSERT	{INSERT} or {INS}
    LEFT ARROW	{LEFT}
    NUM LOCK	{NUMLOCK}
    PAGE DOWN	{PGDN}
    PAGE UP	{PGUP}
    PRINT SCREEN	{PRTSC}
    RIGHT ARROW	{RIGHT}
    SCROLL LOCK	{SCROLLLOCK}
    TAB	{TAB}
    UP ARROW	{UP}
    F1	{F1}
    F2	{F2}
    F3	{F3}
    F4	{F4}
    F5	{F5}
    F6	{F6}
    F7	{F7}
    F8	{F8}
    F9	{F9}
    F10	{F10}
    F11	{F11}
    F12	{F12}
    F13	{F13}
    F14	{F14}
    F15	{F15}
    F16	{F16}
    	
    To specify keys combined with any combination of the SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following codes:
    
    Key	Code
    SHIFT	+
    CTRL 	^
    ALT	%

  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    12

    Re: Sending "{space}" with SendKeys?

    Oh, lol, didn't think about that, pnish. Thanks.


    And thanks for the list, Andrew G. =)

  5. #5
    Registered User
    Join Date
    Apr 2016
    Posts
    1

    Re: Sending "{space}" with SendKeys?

    In that list, which one is SPACEBAR ?

  6. #6
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,834

    Re: [Resolved] Sending "{space}" with SendKeys?

    See post #2

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