Dim strFile As String Dim strParam As String Dim strDirectory As String Const SW_NORMAL = 1strFile = "Notepad.Exe"If (UCase$(Right$(strFile, 4)) = ".EXE") Then Shell strFile & " " & strParam Else If ShellExecute(Me.hwnd, "open", strFile, strParam, strDirectory, SW_NORMAL) = 0 Then MsgBox "执行出错", vbInformation End If End If http://expert.csdn.net/Expert/topic/1848/1848882.xml?temp=.7487757
Dim strFile As String
Dim strParam As String
Dim strDirectory As String
Const SW_NORMAL = 1strFile = "Notepad.Exe"If (UCase$(Right$(strFile, 4)) = ".EXE") Then
Shell strFile & " " & strParam
Else
If ShellExecute(Me.hwnd, "open", strFile, strParam, strDirectory, SW_NORMAL) = 0 Then
MsgBox "执行出错", vbInformation
End If
End If
http://expert.csdn.net/Expert/topic/1848/1848882.xml?temp=.7487757