Set s = opening'(opening为打开文件的一个自定义函数)
With s.Worksheets(1)
.Cells.Replace " ", ""
r = .Cells(65536, 1).End(xlUp).Row
arr = .Range("a2:Z" & r).Value
End With
s.Saved = True
s.Close
Set s = Nothing
弹出打开文件对话框时,点:(取消)就会出现这个错误:
With s.Worksheets(1)
请高手指点一下,如何排除这个错误,直接退出程序就行了,谢谢~~