更新时间:2023-11-22 20:17:28
问题是您正在使用 Chr(10)
这不是删除空格,因此当你调用 ProjFolder = COPSFolder&InProgress\& InfoArray(3)
,您在 InfoArray(3)中有空格
The problem is that you are splitting using Chr(10)
This is not removing the spaces. And hence when you are calling ProjFolder = COPSFolder & "InProgress\" & InfoArray(3)
, you have spaces in InfoArray(3)
您有3个选项
当您创建阵列时,请删除那里的空格或
When you are creating the array, remove the spaces there OR
当您分配 InfoArray = GetPartInfo(File.Path)
时,删除那里的空格或
When you are assigning InfoArray = GetPartInfo(File.Path)
, remove the spaces there OR
更改ProjFolder = COPSFolder&InProgress\& InfoArray(3)到 ProjFolder = Trim(InfoArray(3))
Change the line ProjFolder = COPSFolder & "InProgress\" & InfoArray(3)
to ProjFolder = COPSFolder & "InProgress\" & Trim(InfoArray(3))