经过与同事讨论此问题已经得到解决,需要调用API函数ShellExecute来解决,具体实现方法如下: 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 ShellExecute 0,"Open","Python.exe","C:\Mypython.py","",1 End Sub 以上请参考!
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
ShellExecute 0,"Open","Python.exe","C:\Mypython.py","",1
End Sub
以上请参考!