943,082 Members | Top Members by Rank

Ad:
Jan 15th, 2010
0

Multiple SendKeys

Expand Post »
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.

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Sub test()
  2. SendKeys ("^+F")
  3. Wait
  4. SendKeys ("^+L")
  5. 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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
thedante is offline Offline
1 posts
since Jan 2010
Jan 15th, 2010
0
Re: Multiple SendKeys
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
Reputation Points: 156
Solved Threads: 296
Posting Virtuoso
vb5prgrmr is offline Offline
1,670 posts
since Mar 2009
Jan 16th, 2010
0
Re: Multiple SendKeys
Hi,

Can you check removing Wait..?
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: save
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Setting Paper Size





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC