|
既然是分享的贴,那我就不客气了。谢谢楼主的分享!
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call endwxq
End Sub
Private Sub Workbook_Open()
Sheets(1).Activate
Call trustwxq
End Sub
Private i%
Sub trustwxq()
Dim j%
Sheets(1).Calculate
i = i + 1
If i = 57 Then i = 1
j = i + 28
If j > 56 Then j = j - 56
With ThisWorkbook.Sheets(1).Range("g9")
.Font.ColorIndex = i
.Interior.ColorIndex = j
End With
Application.OnTime Now + TimeValue("00:00:01"), "trustwxq"
End Sub
Sub endwxq()
On Error Resume Next
Application.OnTime Now + TimeValue("00:00:01"), "trustwxq", , False
End Sub |
|