Blinking text in excel sheet

AFZAL SOHAIL

Board Regular
Joined
May 31, 2023
Messages
156
Office Version
  1. 2021
  2. 2016
Platform
  1. Windows
Hi, respected Team:-
Can we add blinking text in excel, or how can we do it blinking?
Thanks in advance please.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
VBA Code:
Public RunWhen As Double

Sub StartBlink()
    With ThisWorkbook.Worksheets("Sheet1").Range("A1").Font
        If .ColorIndex = 3 Then ' Red Text
            .ColorIndex = 2 ' White Text
        Else
            .ColorIndex = 3 ' Red Text
        End If
    End With
    RunWhen = Now + TimeSerial(0,0,1)
    Application.OnTime RunWhen, "'" & ThisWorkbook.Name & "'!StartBlink", , True
End Sub

Sub StopBlink()
    ThisWorkbook.Worksheets("Sheet1").Range("A1").Font.ColorIndex = _
        xlColorIndexAutomatic
    Application.OnTime RunWhen, "'" & ThisWorkbook.Name & "'!StartBlink", , False
End Sub

Then, in the ThisWorkbook code module of the workbook, use code like:

Private Sub Workbook_Open()
    StartBlink
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
    StopBlink
End Sub

Blinking Text In Excel
 
Upvote 0
Mr.Logit,
Thansk a lot sir, it is working only a1 cell, how we will increase the cell range?
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top