Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Send Keys query

Hello,

I'm trying to use the Shell function and SendKeys
statement to open an application, type in my password and
then navigate to a certain point.

There are two problems. Firstly, the application takes a
while to open and therefore the sendkeys "misses". I've
got around this by using a timer, but as the length of
time taken to open the application varies, its a bit hit
and miss and I'm sure there must be a way of waiting for
the thing to load.

Secondly, sometimes the SendKeys just doesn't seem to
work. It'll reach a certain point and then stop.

Here is a sample of my code so far:

Private Sub Commandbutton1_Click()
Dim, myRun, Pausetime, Start
Pausetime = 8
Start = Timer

myRun = Shell("C:\program.exe",1)
Sendkeys "{DOWN 7}~", TRUE 'this bit selects a menu choice
Do While Timer < Start + Pausetime
DoEvents
Loop
SendKeys "Username{TAB}password~QA3~{TAB}(+{TAB}7)B", true
end sub



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Send keys with user input sunspot27 Excel Worksheet Functions 1 August 9th 09 10:20 PM
send keys ksnapp[_52_] Excel Programming 2 April 9th 04 06:41 AM
Send Keys Akshay Bakhai Excel Programming 1 August 22nd 03 03:33 PM
Send Keys [email protected] Excel Programming 0 August 21st 03 08:13 PM
Send Keys pancho[_14_] Excel Programming 1 August 21st 03 07:54 PM


All times are GMT +1. The time now is 10:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"