I want to open some files using my program. and I decided to use a shell command. but when i use shell it gives "file not found error"
for example

Shell("C:\Documents and Settings\ÖnerYavuz\Desktop\aa.txt") ==> it gives error
but
Shell("C:\Documents and Settings\ÖnerYavuz\Desktop\warkey.exe")==> its work
and i thought it opens only exes. but :?:
Shell("C:\Documents and Settings\ÖnerYavuz\Desktop\euroloader") ==> Unfortunately, this also has failed
umm. again :D i thought mybe i forget ".exe"
Shell("C:\Documents and Settings\ÖnerYavuz\Desktop\euroloader.exe")==> failed again...
also it wont open access or powerpoint files.

im really confused. Please Help ME :'(

thx for replys :)

See if this helps.

Private Sub loadFile(ByVal myCoolSelectedFile As String)
        If IO.File.Exists(myCoolSelectedFile) Then
            Process.Start(myCoolSelectedFile)
        Else
            MsgBox("This file does not exist.")
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        loadFile("C:\someFile.someExtension")
    End Sub
Comments
this helped me in my project !!
This question has already been answered. Start a new discussion instead.