Professional Documents
Culture Documents
Application - Sendkeys ("%+") : Ffice XP
Application - Sendkeys ("%+") : Ffice XP
SendKeys ("%+")
ffice XP
expression.SendKeys(Keys, Wait)
Remarks
This method places keystrokes in a key buffer. In some cases, you must call
this method before you call the method that will use the keystrokes. For
example, to send a password to a dialog box, you must call
the SendKeys method before you display the dialog box.
The Keys argument can specify any single key or any key combined with
ALT, CTRL, or SHIFT (or any combination of those keys). Each key is
represented by one or more characters, such as "a" for the character a,
or "{ENTER}" for the ENTER key.
To specify characters that aren't displayed when you press the
corresponding key (for example, ENTER or TAB), use the codes listed in the
following table. Each code in the table represents one key on the
keyboard.
Key
BACKSPACE
BREAK
CAPS LOCK
CLEAR
DELETE or DEL
DOWN ARROW
END
ENTER (numeric keypad)
ENTER
ESC
HELP
HOME
INS
LEFT ARROW
NUM LOCK
PAGE DOWN
PAGE UP
RETURN
RIGHT ARROW
SCROLL LOCK
TAB
UP ARROW
F1 through F15
You can also specify keys combined with SHIFT and/or CTRL and/or ALT.
To specify a key combined with another key or keys, use the following
table.
SHIFT
CTRL
ALT
Example
Application.SendKeys("%fx")
Code
{BACKSPACE} or {BS
}
{BREAK}
{CAPSLOCK}
{CLEAR}
{DELETE} or {DEL}
{DOWN}
{END}
{ENTER}
~ (tilde)
{ESCAPE} or {ESC}
{HELP}
{HOME}
{INSERT}
{LEFT}
{NUMLOCK}
{PGDN}
{PGUP}
{RETURN}
{RIGHT}
{SCROLLLOCK}
{TAB}
{UP}
{F1} through {F15}
Precede
the key
code
with
+ (plus
sign)
^ (caret)
% (percen
t sign)