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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Functionality within external application

Status
Not open for further replies.

ChetShah

Programmer
Feb 12, 2002
5
GB
Hi,

I'm trying to activate the Ctrl Keys within an external app which is launched via VB using the Shell function.I've tried SendKeys but doesn't work. I'd like to basically launch the external app and then have its menu activated when i focus on this external app

Chet
 
I'm not sure but i think that the SENDKEYS has a second argument (BOOL) which when set it FALSE it will send the keystroke to that application even if your program DOESN't have the focus.

Alternatvely you could write some code to your FORM_LOSTFOCUS sub to send the keystrokes you want just before it loses the focus.

You could also try and experiment the ACTIVEFORM keyword:

if Screen.ActiveForm.Caption = "Excel" then ....


Have fun & Let me know what happens.
ARISTON Engineering Ltd
Michael Vezyrgianopoulos
R&D Manager
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top