item not found in “Find” vba

后端 未结 4 649
长发绾君心
长发绾君心 2020-12-17 03:08

I\'m looking for user ID #s from a list. However some users no longer exist. I\'ve tried the test method, the on error go to method, and if

4条回答
  •  清歌不尽
    2020-12-17 03:49

    You will want to do something different than have message boxes, presumably.

    Dim myCell As Range
    
    Set myCell = Cells.Find(What:=uSSO, After:=ActiveCell, LookIn:=xlFormulas, _
    LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    MatchCase:=False, SearchFormat:=False)
    
    If (Not myCell Is Nothing) Then
        MsgBox "something!"
    
    Else
        MsgBox "nothing"
    End If
    

提交回复
热议问题