我正在使用Access 2010,这是我在Access VB IDE中引用库和可用FileSystemObject方法的截图:
当我启动此对象时,似乎无法访问熟悉的方法,我得到了这个例外,如下面的调试结果所示:
我还使用了明确声明和初始化变量来获得相同的结果。
有什么想法可能出了问题?
回复 @4dmonster 的评论,这是实际的数组:
![enter image description here](https://i.imgur.com/Z424lGP.png)
![enter image description here](https://istack.dev59.com/A4QLJ.webp)
有什么想法可能出了问题?
回复 @4dmonster 的评论,这是实际的数组:
For Each p In Split("f:\temp\test\op1\gev_final_1.xlsx;f:\temp\test\op1\gev_final_2.xlsx;f:\temp\test\op1\gev_final_3.xlsx;f:\temp\test\op1\gev_final_4.xlsx;" & _
"f:\temp\test\op1\gev_final_5.xlsx;f:\temp\test\op1\gev_final_6.xlsx;f:\temp\test\op1\gev_final_7.xlsx;f:\temp\test\op2\gev_final_8.xlsx;" & _
"f:\temp\test\op2\gev_final_9.xlsx;f:\temp\test\op2\gev_final_10.xlsx;f:\temp\test\op2\gev_final_11.xlsx;f:\temp\test\op2\gev_final_12.xlsx;" & _
"f:\temp\test\op2\gev_final_13.xlsx;f:\temp\test\op3\gev_final_14.xlsx;f:\temp\test\op3\gev_final_15.xlsx;f:\temp\test\op3\gev_final_16.xlsx;" & _
"f:\temp\test\op3\gev_final_17.xlsx;f:\temp\test\op3\gev_final_18.xlsx;f:\temp\test\op3\gev_final_19.xlsx;f:\temp\test\op4\gev_final_20.xlsx;" & _
"f:\temp\test\op4\gev_final_21.xlsx;f:\temp\test\op4\gev_final_22.xlsx;f:\temp\test\op4\gev_final_23.xlsx;f:\temp\test\op4\gev_final_24.xlsx;" & _
"f:\temp\test\op5\gev_final_25.xlsx;f:\temp\test\op5\gev_final_26.xlsx;f:\temp\test\op5\gev_final_27.xlsx", ";")
p
变量并在Windows运行对话框中输入字符串,则文件将如预期一样打开。驱动器是USB,但这不应该有影响... - thetaGetFolder()
,而GetFolder()
抱怨没有这个名称的文件夹?(假设 "f:\temp\test\op1\gev_final_1.xlsx" 实际上是一个文件....) - Gord ThompsonGetFolder
需要完整路径并返回其文件夹。对于此次打扰,非常抱歉... - theta