How to Make Text Flash in Excel

Updated February 21, 2017

Excel does not feature blinking or flashing text as a font option. Using Excel's built-in Visual Basic for Applications, however, you can use code to make text change colour every section, creating a flashing effect.

Open the Microsoft Excel 2010 file in which you want to make the text flash. Press "Alt" and "F11" to open up the VBA console.

Right-click the "ThisWorkbook" entry on the left side of the VBA console. Move your mouse over "Insert" and choose "Module."

Double-click the "ThisWorkbook" option. Copy the following code and paste it into the white space on the right side of the screen:

Private Sub Workbook_Open()

End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)

End Sub

This code will start and the blinking text when you open this workbook, and stop the blinking text when you close the workbook, once you insert the code to tell Excel what Blink and NoBlink actually mean.

Double-click "Module 1" from the list on the left side of the screen. Place your cursor on the right side of the screen and enter the following line:

Public Timecount As Double

This creates a variable called "Timecount" that you can use in every subroutine.

Press enter to move the cursor to the next line and enter the following code:

Sub blink()

With ThisWorkbook.Worksheets("Sheet1").Range("A1:A10").Font

Timecount = Now + TimeSerial(0, 0, 1)

Application.OnTime Timecount, "Blink", , True

End Sub

This creates a subroutine called "Blink" that will cause all the text within the defined range to flash. You can change the range from "A1:A10" to whatever range you desire, including an individual cell.

Press "Enter" to access the next line and enter the following code:

Sub noblink()

ThisWorkbook.Worksheets("Sheet1").Range("A1:A10").Font.ColorIndex = _

Application.OnTime Timecount, "Blink", , False

End Sub

This will create a subroutine that will run when you close the workbook. It turns all the text back to black, so that someone who opens the workbook without macros enabled will not accidentally see nothing in the text boxes.

Close the VBA console by clicking the "X" in the top-right corner. Click the "File" tab at the top of the screen and choose "Save as." Select "Excel Macro-enabled Workbook" from the drop-down field and type in a name for the workbook. Click "Save."

Close the Excel file and then reopen it. Your text, within the range defined in the macro, will start to flash. Depending on your security settings, you may need to click the "Enable Macros" button at the top of the screen to see the flashing text.

bibliography-icon icon for annotation tool Cite this Article

About the Author

Shawn McClain has spent over 15 years as a journalist covering technology, business, culture and the arts. He has published numerous articles in both national and local publications, and online at various websites. He is currently pursuing his master's degree in journalism at Clarion University.