×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

starting a separate program from Excel

starting a separate program from Excel

starting a separate program from Excel

(OP)
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

Eng-Tips Forums:Real Solutions for Real Problems Really Quick.

RE: starting a separate program from Excel

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.

RE: starting a separate program from Excel

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!

RE: starting a separate program from Excel

RetVal = Shell(ShellPath, vbNormalFocus)

where ShellPath is the full path and program name

TTFN



RE: starting a separate program from Excel

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources