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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Windows Application from VB

Status
Not open for further replies.

GregGood

Programmer
Jan 24, 2004
16
0
0
US
Hello,
Does anybody have an example that you can send me of VB code that runs (launches) a window application like Word or Excel or a BAT file. I know just enough about VB to be dangerous.
Thank you for any help you can give me.
Greg Good
 
The simplest thing to do is put the below:
x = shell("C:\progra...blah\excel.exe")

...into a vb app. you could pretty much do the same in a .bat file.

You could use ShellExecute, calling an .xls file or .mdb file or whatever.

You could also do CreateProcess()...this is now getting more complex and is certainly not a one-line solution.

Further, you could create, for example, an Excel.Application Object in VB and call the objects properties and methods from within vb.

It depends on how much code you want to write and how much control you want over this.
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top