sub Sample1()
Dim WSH, wExec, sCmd As String, Result As String
Set WSH = CreateObject("WScript.Shell") ''(1)
''(2)
Set wExec = WSH.Exec("xcopy /?") ''(3)
Result = wExec.StdOut.ReadAll ''(5)
MsgBox Result
Set wExec = Nothing
Set WSH = Nothing
End Sub
http://club.excelhome.net/thread-185905-1-1.html 9楼
http://www.excelba.com/Art/Html/370.html