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!

Can Excel VBA Interact with GUI Apps?

Status
Not open for further replies.

cgraeter

Programmer
Sep 27, 2006
21
US
Does anyone know of a functionality in Excel or a plug in that would allow Excel to interact with a GUI application's user interface? I'm aware of applications that can interact with the objects on a GUI interface (like IBM Rational Functional Tester), but can't determine if I can get Excel to do the same. Any help/guidance offered would be greatly appreciated! Thanks all!
 
Excel VBA could interact with any GUI application exposing a COM API.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
The way I understand COM API's is that they would allow another app to interact with them kinda "behind the scenes". I'm more looking for a way to interact directly with the objects in a GUI interface. Like, can Excel VBA click into a text box and send in a string and then click a command button afterward? Any other ideas/thoughts? Thanks everyone!
 
You can use Application.SendKeys to mimic someone actually typing. Use AppActivate to send control to the app first.

Problem is that if the user decides to select another window the code will continue to write to that one instead.

Cheers,

Roel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top