move files from one folder to another

前端 未结 5 906
广开言路
广开言路 2020-12-18 07:27

actually I am searching for code to move excel files from one folder to another if there is any way to do so Please someone help me. I am very sorry but I dont know how to d

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-18 08:21

    Try with the below code

    Sub test()
        Set fso = CreateObject("scripting.filesystemobject")
        fso.MoveFile Source:="C:\work\test1.xlsx", Destination:="c:\work\movecheck\" ' replace with source and destination as required.
    End Sub
    

提交回复
热议问题