- 帖子
- 2842
- 主題
- 10
- 精華
- 0
- 積分
- 2898
- 點名
- 0
- 作業系統
- 〔略〕
- 軟體版本
- 〔略〕
- 閱讀權限
- 100
- 性別
- 男
- 來自
- 〔略〕
- 註冊時間
- 2013-5-13
- 最後登錄
- 2025-4-28
|
3#
發表於 2016-5-16 14:02
| 只看該作者
Private Sub CommandButton1_Click()
Dim xF As Range
Set xF = [表單2!2:2].Find([D1].Value, Lookat:=xlWhole)
If xF Is Nothing Then MsgBox "找不到符合日期!": Exit Sub
xF(3, 1).Resize(3) = [B3:B5].Value
End Sub
Private Sub CommandButton2_Click()
Dim xF As Range
Set xF = [表單2!2:2].Find([D8].Value, Lookat:=xlWhole)
If xF Is Nothing Then MsgBox "找不到符合日期!": Exit Sub
xF(3, 2).Resize(3) = [B10:B12].Value
End Sub |
|