PDA

View Full Version : Sleeper: How to call or execute a program from excel Vba editors?



Kian
03-18-2005, 06:10 AM
Hello Alls,

I am new here. I was wondering how do I use the excel VB editor to call the execute program (what ever programs) to run. Example I have the plot program that I can call from excel VB. I had follow the following code but did not get the program run. Any ideal?

VBA Express Forum > VBA Code & Other Help > Other Applications Help > Solved: GetOpenFilename in MS Project (http://www.vbaexpress.com/forum/showthread.php?t=1029)


Kian

Zack Barresse
03-18-2005, 09:41 AM
Hi Kian, welcome to VBAX!!

To get a good idea about the Visual Basic Editor (VBE) in Excel - the Visual Basic for Applications - interface, check out our Training and Certification: Lesson 1 (http://www.vbaexpress.com/training). It covers an Introduction to the Visual Basic Editor. The first lesson is free. :yes

Let us know if you have any other questions after you read that.

Steiner
03-21-2005, 06:11 AM
Hi Kian,

it pretty much depends on what you want to do with the program. If you just want to run it, a simple


Shell "c:\winnt\explorer.exe"
should be enough.

The code in the posting you mentioned is just getting the name of a file selected in a dialog, it is not supposed to run it. But once you have the full name, you could use Shell to run it.

Steiner