本示例将演示在指定了查找(Find)和查找下一个(FindNext)命令之后,如果继续执行Find启动的搜索。

Set fc = Worksheets("Sheet1").Columns("B").Find(what:="kingsoft")

MsgBox "第一次出现" & fc.Address

Set fc = Worksheets("Sheet1").Columns("B").FindNext(after:=fc)

MsgBox "第二次出现 " & fc.Address

Set fc = Worksheets("Sheet1").Columns("B").FindPrevious(after:=fc)

MsgBox "回到第一次查找到kingsoft的单元格" & fc.Address