各位大神幫忙看看為什么報錯啊,需要怎么改,報錯運行時錯誤424要求物件
Function xcopycsv(ByRef inpath() As String, ByVal outpath As String)
Dim i As Integer
Dim Shell As Object
Dim ot As Object
Set Shell = CreateObject("WScript.Shell")
For i = 1 To UBound(inpath)
Set ot = Shell.Run("cmd /c xcopy /y " & Chr(34) & inpath(i) & Chr(34) & " " & Chr(34) & outpath & Chr(34), vbHide, True)
Do While ot.Status = 0
DoEvents
Loop
Next
End Function
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/7357.html
標籤:VBA
上一篇:VBA 代碼 運行 卡死
