- 帖子
- 19
- 主題
- 1
- 精華
- 0
- 積分
- 24
- 點名
- 0
- 作業系統
- Windows XP
- 軟體版本
- Office 2003
- 閱讀權限
- 10
- 性別
- 男
- 註冊時間
- 2010-10-18
- 最後登錄
- 2011-2-20
|
9#
發表於 2010-10-19 21:02
| 只看該作者
Sub yy()
With Sheet1
If TimeValue(Format(Now, "hh:mm:ss")) <= TimeValue("08:59:00") Then
Range("A3:I50000") = ""
Else
If TimeValue(Format(Now, "hh:mm:ss")) >= TimeValue("09:00:00") And TimeValue(Format(Now, "hh:mm:ss")) <= TimeValue("13:32:30") Then
ar = Array([A2], [B2], [C2], [D2], [E2], [F2], [G2], [H2], [I2])
[A65536].End(xlUp).Offset(1, 0).Resize(, 10) = ar
Application.OnTime Now + TimeSerial(0, 0, 10), "yy"
End If
End If
End With
End Sub
Sub xx()
With Sheet2
If TimeValue(Format(Now, "hh:mm:ss")) <= TimeValue("08:44:00") Then
Range("A3:J50000") = ""
Else
If TimeValue(Format(Now, "hh:mm:ss")) >= TimeValue("08:45:00") And TimeValue(Format(Now, "hh:mm:ss")) <= TimeValue("13:45:00") Then
ar = Array([A2], [B2], [C2], [D2], [E2], [F2], [G2])
[A65536].End(xlUp).Offset(1, 0).Resize(, 7) = ar
Application.OnTime Now + TimeSerial(0, 0, 10), "xx"
End If
End If
End With
End Sub |
|