Time based cell content view

thompson

New Member
Joined
Jul 22, 2004
Messages
7
Is there a way to have the contents of a cell exposed for a period of time (eg 5 seconds) with a hot key command?

For example, I have a calculation I don't want visable at all times. Is there a way to change the text color from white to black for 5 seconds then back to white at the end of the 5 seconds?
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hello

Would something like this help?
Code:
Sub ChangeColour()

TimeNext = DateAdd("s", 5, Time)
Range("A1").Font.ColorIndex = 1
Application.Wait TimeNext
Range("A1").Font.ColorIndex = 2
End Sub
You can assign a hot key to suit. However, bear in mind that you won't be able to do anything on your sheet while the macro waits for the 5 seconds.

HTH

Regards
 
Upvote 0
If you would like to do something while the celltext is displayed, use this code.

Kind regards,
Erik

Code:
Sub ChangeColour()
Dim oldTime As Variant
TimeNext = DateAdd("s", 5, Time)
Range("A1").Font.ColorIndex = 1
oldTime = Timer
Do
DoEvents
Loop Until Timer - oldTime > 5
Range("A1").Font.ColorIndex = 2
End Sub
 
Upvote 0

Forum statistics

Threads
1,203,060
Messages
6,053,305
Members
444,651
Latest member
markkuznetsov1

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