SendKeys to imitate key strokes


These VBA functions are very useful when you write macros to imitate keystrokes such as "Ctrl, Alt, Shift, etc."

Key
Code
BACKSPACE
{BACKSPACE} or {BS}
BREAK
{BREAK}
CAPS LOCK
{CAPSLOCK}
CLEAR
{CLEAR}
DELETE or DEL
{DELETE} or {DEL}
DOWN ARROW
{DOWN}
END
{END}
ENTER (numeric keypad)
{ENTER}
ENTER
~ (tilde)
ESC
{ESCAPE} or {ESC}
HELP
{HELP}
HOME
{HOME}
INS
{INSERT}
LEFT ARROW
{LEFT}
NUM LOCK
{NUMLOCK}
PAGE DOWN
{PGDN}
PAGE UP
{PGUP}
RETURN
{RETURN}
RIGHT ARROW
{RIGHT}
SCROLL LOCK
{SCROLLLOCK}
TAB
{TAB}
UP ARROW
{UP}
F1 through F15
{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.
To combine a key with
Precede the key code with
SHIFT
+ (plus sign)
CTRL
^ (caret)
ALT
% (percent sign)

Comments

Jose
02 Feb 2016, 17:33
Is this live?
Jose Balboa
16 Apr 2016, 14:04
Working
*Name:
Email:
Notify me about new comments on this page
Hide my email
*Text:
 
 
Comments Powered by: Scriptsmill Comments Script
Web designed by: Jose Guevara Balboa © 2015Comments Admin