- 帖子
- 5923
- 主題
- 13
- 精華
- 1
- 積分
- 5986
- 點名
- 0
- 作業系統
- win10
- 軟體版本
- Office 2010
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台灣基隆
- 註冊時間
- 2010-5-1
- 最後登錄
- 2022-1-23
        
|
3#
發表於 2014-7-26 15:45
| 只看該作者
回復 1# bridetobe - Private Sub CommandButton1_Click()
- Dim a_date ' As String
- a_date = InputBox("輸入日期(例2014/7/1):")
- With Sheet2
- Set A = .Range("A2", .[a2].End(xlDown)).Find(what:=a_date, LookIn:=xlValues) '搜尋文字
- End With
- If Not A Is Nothing Then
- MsgBox ("有")
- Else
- MsgBox ("沒有資料")
- End If
- End Sub
- Private Sub CommandButton2_Click()
- Dim a_date As Date
- a_date = InputBox("輸入日期(例2014/7/1):")
- With Sheet2
- Set A = .Range("A2", .[a2].End(xlDown)).Find(what:=a_date, LookIn:=xlFormulas) '搜尋公式
- End With
- If Not A Is Nothing Then
- MsgBox ("有")
- Else
- MsgBox ("沒有資料")
- End If
- End Sub
複製代碼 |
|