Text in Cell Based On Time

Papi

Well-known Member
Joined
May 22, 2007
Messages
1,592
Is it possible to enter a specific text statement in a cell i.e. "Enter Date Here" and if nothing else is entered within say 10 seconds then the text disappears. What will entered in the cell is a date. What I am trying to do is that if somebody flags the cell and then does not enter a date that the words "Enter Date Here" disappear.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Something like this?
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set Target = Range("A1")
Break = 10
HourNow = Timer
Do While Timer < HourNow + Break
If Target = "Enter Date Here" Then
DoEvents
End If
If Target <> "Enter Date Here" Then Exit Sub
Loop
Target.ClearContents
End Sub
 
Upvote 0
Hello machopicho,

Thanks for helping out. Would this go inside using Alt F11 and insert in "This Workbook". I tried that and put "Enter Date Here" in cell A1 of sheet1 but it did not do anything. What I have are several cells where a date could be entered and I run a small macro to flag the cell with "Enter Date Here". Another macro will be ran and will select from a calendar and paste a date from the calendar which should shutoff the timer. If no date is entered I would like to see the words "Enter Date Here" simply remove itself in a maximum of 10 seconds.
 
Upvote 0
I hope I am understanding this correctly. I press Alt + F11 and insert the code into "ThisWorkbook". I then run a macro which places the text "Enter Date Here" and then the cursor to a small section that is a makeshift calender. If I do not invoke the second macro which is to copy the date, return to "Enter Date Here" to paste the value of the date chosen then the words "Enter Date Here" will remove themselves in about 10 seconds. Is this correct?

Calender Test.xlt
BCDEFGHIJ
10August2011
11SunMonTueWedThuFriSat
12 123456
1378910111213
1414151617181920
15EnterDateHere21222324252627
1628293031   
17       
Data
 
Upvote 0
I hope I am understanding this correctly. I press Alt + F11 and insert the code into "ThisWorkbook".
Watch below:
20ux5k1.jpg

I then run a macro which places the text "Enter Date Here" and then the cursor to a small section that is a makeshift calender.

Try macro in a blank sheet to understand it working and then adapt its as you need.
 
Upvote 0

Forum statistics

Threads
1,224,560
Messages
6,179,519
Members
452,921
Latest member
BBQKING

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