0

hi could anyone help me out with the below coding on send keys in Excel VBA

I have a excel fiel in cel a1 i have username and password in cell a2
and i have a web page with login texbox and password text box and a submit button

below is my coding.( writing as a module and call it in a button click event in excel )

SUb n(
Range("A1").Select
selection.copy

AppActivate "Welcome to Rediff.com India"

Application.SendKeys ("^V")

End sub

the above coding is only a part when i execute the above the web page gets
activated

But doesnot paste the selected value in the cell a1 and does not show
any error.

kindly assit to correct my coding..

Thanks in advance

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by cguan_77
0

hi prasadh, quite some time already..anyway..were you able to solve this problem... you might need to use some delay to achieve this.. check below for the syntax of sendkeys

but sendkeys may not work anymore in vista..

SendKeys Statement
Sends one or more keystrokes to the active window as if typed at the keyboard.
Syntax
SendKeys string[, wait]

Wait : Optional. Boolean value specifying the wait mode.
If False (default), control is returned to the procedure immediately after the keys are sent.
If True, keystrokes must be processed before control is returned to the procedure.
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.