Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 consecutive SendKeys commands

Status
Not open for further replies.

lancos

Programmer
Dec 13, 2000
3
0
0
JP
From a VBA script, I send 2 SendKeys commands which opens 2 dialogs.

SendKeys "%feu" & StrFileName &"{Enter}"
Debug.print "Hello"
Wait 1
Debug.print "Hello2"
Sendkeys "{right}"+"{right}"+"{enter}"

The first command will open a Save as dialog, enter the file name path and close the dialog. After closing this dialog, a second dialog is automatically opened by the software under which the VBA macro runs. The second Sendkeys command should close the second dialog. However, it seems that the second command is not executed and the second dialog remains opened. Hello is displayed in the immediate window but not hello2

Any ideas of workaround?
 
What application are you using the VBA in? And what is the second dialog that's opening?

Also, you'd probably get more responses if you post in forum707

Regards

Andy
---------------------------------
Zebracorn: 50% Zebra, 50% Unicorn = 100% Real.

 
The application under which the script runs is the company's software to display measurement data.
The second dialog allows the user to select the data to be exported in the text file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top