Kod:
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
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Public Function OpenFile(ByVal DocName As String) As Long
Dim Scr_hDC As Long
Scr_hDC = GetDesktopWindow()
OpenFile = ShellExecute(Scr_hDC, "Open", DocName, "", "C:", 1)
End Function
Combonun Eventine
Kod:
Private Sub Command1_Click()
dsy = OpenFile(App.Path & "DosyaAdı.exe") 'App.Path Kullanmayıp dosya yolunu da belirtebilirsiniz.
If dsy = 2 Then
MsgBox "Dosya Bulunamadı"
Else
End If
End Sub
İsine Yarayabılır
Arşivimden Buldum Gerekli Fonksiyonları Declare Ettikten sonra kullanabılırısn fonksıyonlarıda verdım zaten arada fazla kodlar var gereksizdir onlar kolay gelsin