Dear All,
I'm trying change colour every sec in worksheet.
This Workbook module
Standard Module
Code fails at Application.OnTime nTime, "Colors56"
Any help would be greatly appreciated.
Biz
I'm trying change colour every sec in worksheet.
This Workbook module
Code:
Private Sub Workbook_Open()
'MsgBox "Bank_format_print " & Now
Call RunEverySec
End Sub
Standard Module
Code:
Public nTime As Double
Sub RunEverySec()
nTime = Now + TimeValue("00:00:01")
Application.OnTime nTime, "Colors56"
Calculate
End Sub
Sub colors56()
'Application.Calculation = xlCalculationManual
Dim i As Long
Cells(1, 1).Interior.ColorIndex = Application.RandBetween(0, 56)
done:
'Application.Calculation = xlCalculationAutomatic
End Sub
Code fails at Application.OnTime nTime, "Colors56"
Any help would be greatly appreciated.
Biz