【发布时间】:2015-06-15 03:03:44
【问题描述】:
我的代码是:
Dim wb As Workbook
Dim MyObj As Object, MySource As Object, file As Variant
file = Dir("C:\Users\dlf164\Desktop\NE\")
While (file <> "")
If InStr(file, a) > 0 Then
Set wb = Workbooks.Open(file)
End If
file = Dir
Wend
我收到的错误是应用程序或对象定义的运行时错误。
如何解决?
【问题讨论】:
-
也许
file不是 Excel(兼容)文件? -
它的excel兼容