List of SendKeys in VBA
The SendKeys technique simulates keystrokes that you would manually performing in any window applications. Use with alert, since it can have unforeseen outcomes.
You must put activate window as whichever application you are automating through SendKeys.
Say for Example you are automating a e-mail item through excel macro which need to be send automatically in the time user specified. Assume that you are writing an important e-mail manually at the time of other Macro performing which consisting of SendKeys functions built in it.
May cause a result of sending wrong email item, instead of Macro sends. Because you are currently working one is the active item wherein the SendKeys going to perform.
To avoid this situation activate the specific application/mail item before Sendkeys perform.
Please find the below SendKeys List.
You must put activate window as whichever application you are automating through SendKeys.
Say for Example you are automating a e-mail item through excel macro which need to be send automatically in the time user specified. Assume that you are writing an important e-mail manually at the time of other Macro performing which consisting of SendKeys functions built in it.
May cause a result of sending wrong email item, instead of Macro sends. Because you are currently working one is the active item wherein the SendKeys going to perform.
To avoid this situation activate the specific application/mail item before Sendkeys perform.
Please find the below SendKeys List.
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) |
Posted by