Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

starting a separate program from Excel

Status
Not open for further replies.

Qshake

Structural
Jul 12, 2000
2,672
All,

I would like to create a macro in excel that runs another program using the data from that excel file. It's the running the other program that I don't know how to do. I would be grateful for any thoughts on the matter.

Regards,
Qshake
[pipe]
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
 
Replies continue below

Recommended for you

IN VBA look at the help for shell function and ActivateMicrosoftApp Method

In Excel dig around in the ActiveX help, it looks like you might be able to do it from there.



Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
It's easier if the other program is part of the MS Office suite, in which case you can do this directly. Open up your Object Browser in the VBE screen and look at the options under Application.

I did this way back in 1999, opening up Access, searching a database for matching records, then writing a line to the database and opening up Word and performing a mail merge with the data. It was my first ever macro and I managed to pull it off, so it's not that hard!
 
RetVal = Shell(ShellPath, vbNormalFocus)

where ShellPath is the full path and program name

TTFN



 
A very quick method is to insert a hyperlink to the other program (press Ctrl-K, and browse for the file, for example C:\WINNT\system32\calc.exe ). When you click on the hyperlink, the program is executed (after the usual security stuff...)

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor