Opening a file or an application

I now use:

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

with -
ShellExecute Me.hwnd, "Open", Link, 0&, 0&, 5

to open an internet site or to bring up a file in an application.  How can I change this to only open applications in my computer?
Lee5Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Erick37Commented:
If you only want to run an application you can use the Shell command:

Call Shell("c:\windows\notepad.exe", vbNormalFocus)
0
phairat2000Commented:
We can run all application on windows application or dos application with command "Shell" . This is an example ,Uses to run Bat File and PKZIP.EXE >>>

CopyStr = pPathBase + "copy.bat"
    focus = Shell(CopyStr)
   
    ShellStr = pPathBase & "pkzip.exe " & pPathBkup & BkupName & " " & pPathBase & "db_bks.mdb"
   
 focus = Shell(ShellStr, 3)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Erick37Commented:
Hmmmm...
0
sonalchouhanCommented:
use shell

dim retval

retval = shell("C:\Program Files\Internet Explorer\Iexplore.exe")

all the best



0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.