你的問題是 當你到sheet2 看圖時 會發生錯誤嗎?
如果是 那少了一點(紅點)
Private Sub download() '此程序與 Workbook_Open 同在 ThisWorkbook裡
Dim TimeRange As Range, Rng As Range, R As Range, i%
With Sheet1
Set TimeRange =. [A:A].Find(TimeSerial(Hour(Time), Minute(Time), "00"))
Set Rng = TimeRange.Offset(, 1).Resize(1, 4)
For Each R In .Range("D2,D3")
i = i + 1
Rng(i) = R
Next
End With
If Time > TimeValue("19:00:00") Then Exit Sub
Application.OnTime Now + TimeValue("00:01"), "module1.download"
End Sub作者: linsj 時間: 2011-3-26 06:35