954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Multiple SendKeys

Hi All,

I am new with the send keys in VBA. Basically I'd like to send a bunch of sendkeys. I don't have problem with the synthax but the problem is that excel only execute the 1st sendkeys I have written.

Sub test()
SendKeys ("^+F")
Wait
SendKeys ("^+L")
End Sub


i.e it only types Ctrl Shif F but not Ctrl Shift L there after/

Could you please help me?

Much appreciated.

Thanks

thedante
Newbie Poster
1 post since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

Well I do not see where you have the procedure Wait defined but it should be a doevents/sleep loop that is long enough to allow the first operation from the sendkeys to execute before the second sendkeys is sent...

Good Luck

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

Hi,

Can you check removing Wait..?

QVeen72
Posting Shark
950 posts since Nov 2006
Reputation Points: 84
Solved Threads: 143
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You