Question Locked

Sendkeys in Visual Basic

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

How do I place a pause using sendkeys?

My problem is this - I need to copy a frame containing data from a web page and paste it into a particular worksheet in Excel then return to the start worksheet to begin the routine again.

Sendkeys works fine up to the point of pasting, but obviously the code to return to the start sheet executes before the paste, and the table is pasted into the start sheet.

I've tried 'slowing' the routine down by adding some 'go to's' and sendkeys "{TABS}" after the paste but it makes no difference - the code still executes in the wrog order.

Many thanks

5 replies

by robaaaaaa2

Using any tricks to loop the code will always be dependant on the processor speed etc.

Try using a Timer control, e.g.

Timer1.Enabled = True
Timer1.Interval = 16000

This fires a Timer1_timer event about every 15 seconds

by jetplane7

There is a program called snagit from Techsmith tht can do jsut that. it has a 30 day working copy but you will want it for ALL the great stuff that program can do.
wwww.revkev.tv

This discussion is closed to new replies.