The code below works fairly well but, the problem is once the code starts running it's almost impossible to close your workbook. The only way i have found to close is to click "Pause" from within the VB edit window, then close out of the workbook.
Please look at this code and see if you can correct any problems.
Here is the code;
Placed in a new Module:
Sub Flash()
NextTime = Now + TimeValue("00:00:01")
With Cells(9, 8).Font
If .ColorIndex = 2 Then .ColorIndex = 3 Else .ColorIndex = 2
End With
Application.OnTime NextTime, "Flash"
End Sub
Sub StopIt()
Application.OnTime NextTime, "Flash"
Application.OnTime NextTime, "Flash", Schedule:=False
Cells(9, 8).Font.ColorIndex = xlAutomatic
End Sub
Placed in This Workbook:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Calculate
If Cells(9, 8).Value > 0 Then
Flash
Else
StopIt
End If
End Sub
Thx,
Noir
Please look at this code and see if you can correct any problems.
Here is the code;
Placed in a new Module:
Sub Flash()
NextTime = Now + TimeValue("00:00:01")
With Cells(9, 8).Font
If .ColorIndex = 2 Then .ColorIndex = 3 Else .ColorIndex = 2
End With
Application.OnTime NextTime, "Flash"
End Sub
Sub StopIt()
Application.OnTime NextTime, "Flash"
Application.OnTime NextTime, "Flash", Schedule:=False
Cells(9, 8).Font.ColorIndex = xlAutomatic
End Sub
Placed in This Workbook:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Calculate
If Cells(9, 8).Value > 0 Then
Flash
Else
StopIt
End If
End Sub
Thx,
Noir