Run another software program programmatically?

Hap

Well-known Member
Joined
Jul 20, 2005
Messages
647
The USGS has a .jar program used to provide earthquake hazard data giving lat and long coordinates. The program also has an option to import and export an .xls batch file.

Is it "possible" to programmatically open, run, send a batch file, return the batch file, and close the program all in VBA?

Thank you
 
I appreciate the effort anyway. The other problem I see is the process still appears in Task Manager even after the java program is closed. I'm not sure what I can do programmatically to resolve this. If I had run any instance anytime during the day then your code would immediately recognize a process that was already running even if the program isn't open and has focus.

That would be ideal, if I could find a way to know when the program was waiting for user input. I've also had trouble with the AppActivate method. I was trying to insure that the program had focus so my sendkeys weren't being applied to the open and active excel file. Is there another way to set the focus of a program? Sort of like a Switch To event under Task Managers Applications list (assuming this is a collection?).

Thank you
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top