7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| Public Sub StartFlashing() Application.OnTime EarliestTime:=Now() + TimeSerial(0, 0, 1), _ Procedure:="FlashText", _ Schedule:=True End Sub Public Sub StopFlashing() On Error Resume Next Application.OnTime EarliestTime:=Now() + TimeSerial(0, 0, 1), _ Procedure:="FlashText", _ Schedule:=False End Sub Public Sub FlashText() Static bBoolean As Boolean With ActiveWorkbook.Styles("Flash") If bBoolean = True Then .Font.Color = RGB(255, 255, 255) .Interior.Color = RGB(10, 10, 255) Else .Font.Color = RGB(0, 0, 0) .Interior.ColorIndex = xlNone End If End With bBoolean = Not bBoolean Application.OnTime EarliestTime:=Now() + TimeSerial(0, 0, 1), _ Procedure:="FlashText", _ Schedule:=True End Sub
|