运行以下程序时,遇到“运行时错误'53':找不到文件”。
我已经仔细检查了路径,并且文件确实存在。
Sub OpenFiles()
Dim MyFolder As String
Dim MyFile As String
MyFolder = "/Users/my_name/desktop/excel_files"
MyFile = Dir(MyFolder & "/*.xl??")
Do While MyFile <> ""
Workbooks.Open Filename:=MyFolder & "/" & MyFile
MyFile = Dir()
Loop
End Sub
我正在使用Excel for Mac2017。