返回列表 上一主題 發帖

[發問] 如何處理用FIND時出現的ERROR91?

回復 1# 小俠客

Dim a as range
    set a= x.columns(1).Find(CELL_FIND(I), SearchOrder:=xlByRows, SearchDirection:=xlPrevious)
if not a is nothing then last = a.Row else msgbox "找不到資料"
學海無涯_不恥下問

TOP

回復 4# 小俠客
  1. Sub ex()
  2. Set a = Columns("A").Find("陳大文", after:=[A65536], SearchOrder:=xlByRows, SearchDirection:=xlFirst)
  3. MsgBox a.Row
  4. Set a = Columns("A").Find("陳大文", after:=[A65536], SearchOrder:=xlByRows, SearchDirection:=xlPrevious)
  5. MsgBox a.Row
  6. End Sub
複製代碼
學海無涯_不恥下問

TOP

        靜思自在 : 能幹不幹,不如苦幹實幹。
返回列表 上一主題