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

AppActivate Syntax

Status
Not open for further replies.

f64

Technical User
May 23, 2003
24
US
I am trying to use AppActivate to shift screen focus from Excel to a simulation program, SIMUL8, but I am having trouble debugging the statement. I have tried

AppActivate “SIMUL8”
and
AppActivate “nnnnnnnn SIMUL8”

(where nnnnnnnn is the model name) and I keep getting a “Run-time error ‘5’, Invalid procedure call or argument” message in VB. The title bar in SIMUL8 reads “nnnnnnnn SIMUL8”, so I think the second option should be correct. Anyone know what I’m doing wrong?
 
If your simulation program is launchend by VBA with the Shell function, you can use the task ID:
myTaskID=Shell(....)
AppActivate myTaskID

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top