我正在尝试从文件夹中打开xls格式的文件,并使用宏工作簿从中获取数据,但是无法执行此操作。我把它当作空的
Application.ScreenUpdating = False
sPath = "C:\Documents and Settings\Administrator\My Documents\New Folder"
qwe = Dir(sPath & "*.xls")
我得到的qwe为空,即使文件夹不为空,它也具有3个xls格式的excel文件。
我认为这可能可行,只需在“新文件夹”目录中的de上添加一个斜线,而不是在“我的文档”目录中以“ New Folder”开头的所有xls都可以:
sPath = "C:\Documents and Settings\Administrator\My Documents\New Folder"
qwe = Dir(sPath & "\*.xls")
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句