Run-time error 91 using Range.find

前端 未结 1 1006
无人及你
无人及你 2020-12-12 04:59

SOLVED Nathan_SAV had the right idea. For anyone looking at this for reference later I changed the code to

For x = 3 To lRow
On Error Resume Next
\'If then          


        
相关标签:
1条回答
  • 2020-12-12 05:22

    The data may not be found, so try

    Dim S as long
    Dim R as excel.range 
    set R=Range("A:A").Find
    if R is nothing then 
        'Not found, handle
    else
        S=R.row
    end if
    
    0 讨论(0)
提交回复
热议问题