【发布时间】:2022-01-12 13:57:34
【问题描述】:
我正在从列表中查找用户 ID #s。然而,一些用户不再存在。我试过test 方法、on error go to 方法和if err.number<> 0 then 方法。我仍然收到Run-time error '91': object variable or with block variable not set。该号码在列表中不存在。下面是我的代码,尝试了几次没有结果
On Error GoTo errorLn
If Err.Number <> 0 Then
GoTo errorLn
End If
Cells.Find(What:=uSSO, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Select
还有哪些其他选择?还是我放错了“错误”行? “cells.Find...”前后我都试过了
【问题讨论】: