返回列表 上一主題 發帖

[發問] 如何讓資料填入指定日期的儲存格內?

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

TOP

        靜思自在 : 世上有兩件事不能等:一、孝順 二、行善。
返回列表 上一主題