Another Program

Teelo
10-12-2002, 02:44 PM
How can I execute another program with parameters from a VB program I make? Like explorer, but a file in particular?

OnErr0r
10-12-2002, 02:48 PM
Shell "exename.exe param1 param2"

Teelo
10-12-2002, 02:55 PM
Yeah, but when I do that , I get told: Object required, and if I dont put the .com after command, then Type Mismatch. I need the path for command, right? But how to do that in Form Load?

Gamer256
10-12-2002, 02:58 PM
I don't get it, but check this:



Dim File As String, Params as String

If Right(App.path, 1) = "\" Then

File = App.Path & "File.exe"

Else

File = App.Path & "\File.exe"

End If


Params = "" 'Your parameters here


Call Shell(File & " " & Params, vbNormalFocus)



welcome.

ChiefRedBull
10-12-2002, 05:06 PM
ShellExecute

Teelo
10-12-2002, 05:10 PM
Yeah, OK I got the problem sorted. Thanks for the info.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum