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