不用那么麻烦!
Like this :
Shell CALC.EXE

解决方案 »

  1.   

    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 LongFunction StartDoc(DocName As String) As Long
      Dim Scr_hDC As Long
      Scr_hDC = GetDesktopWindow()
      
      'change "Open" to "Explore" to bring up file explorer
      StartDoc = ShellExecute(Scr_hDC, "open", DocName, "", "C:\", 1)
    End Function
    调用这个函数就可以了,docname是想执行的程序路径
      

  2.   

      Dim Scr_hDC As Long
      Scr_hDC = GetDesktopWindow()
      
      ShellExecute(Scr_hDC, "open", "notepad", "", "C:\", 1)