Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我收到错误 #5:
"Invalid Procedure Call or Argument"
当我运行以下命令时:
Dim i as Integer i = Shell(" copy /y C:\directory\from\file.dbf C:\directory\to\file.dbf ", vbMaximizedFocus)
有什么帮助吗?
没有copy可执行文件。该命令内置于cmd.exe. 此外,命令开头不得有任何空格。将指令更改为:
copy
cmd.exe
i = Shell("cmd /c copy /y C:\src\file.dbf C:\dst\file.dbf", vbMaximizedFocus)
请注意,您必须引用包含空格的路径。