【发布时间】:2016-02-12 01:20:16
【问题描述】:
我在循环中找到了这个。当有“0”时它工作正常,但当没有更多“0”时,我得到运行时错误 91。有什么想法吗?
Cells.Find(What:="0", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
【问题讨论】:
-
Cells.Find(What:="0", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _ , SearchFormat:=False).Activate THIS IS THE CODE IN QUESTION
-
另外,一个快速的解决方案可能只是删除最后的
.Activate。但是请提供更多代码,因为我不知道您如何使用Cells.Find()。