返回列表 上一主題 發帖

[發問] 利用application.inputbox搜尋日期

回復 1# 蒼雪


    Sub FindDate()
    Dim FD As Date
   
    FD = Application.InputBox("請輸入日期", "日期搜尋")
    If FD = False Then
       Exit Sub
    Else
        For Row = 1 To 10
            For col = 1 To 10
                If (InStr(1, Cells(Row, col), FD)) Then
                    Range(Cells(Row, col), Cells(Row, col)).Select
                    GoTo found
                End If
            Next col
        Next Row
        MsgBox ("Not Found")
    End If
found:

End Sub

TOP

        靜思自在 : 忘功不忘過,忘怨不忘恩。
返回列表 上一主題