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.
- Skill level:
- Moderately Challenging
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()
Private Sub Workbook_BeforeClose(Cancel As Boolean)
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:
If .ColorIndex = 3 Then .ColorIndex = 2 Else .ColorIndex = 3 End If End With
Timecount = Now + TimeSerial(0, 0, 1)
Application.OnTime Timecount, "Blink", , True
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:
ThisWorkbook.Worksheets("Sheet1").Range("A1:A10").Font.ColorIndex = _
Application.OnTime Timecount, "Blink", , False
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.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for