Date and Time Picker

Bandy1

New Member
Joined
Dec 7, 2019
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
Hello everybody and thanks for having me!
I have placed a Microsoft Date and Time Picker into my workbook and it works as it should until I save and close the workbook and re-open later it to review/modify data.
The date reverts back to default and not the date entered and saved by me.
Is there any way to save the date entered?
 

Some videos you may like

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,593
Office Version
  1. 2007
Platform
  1. Windows
Welcome to the board!

Try the following:
- click the Developer tab.
- click Design Mode
- Select Date and Time Picker control
- To set the control properties, on the Developer tab, in the Controls group, click Properties.
You can also right-click the control, and then click Properties.

- The Properties dialog box appears. In the Linkedcell property type one cell , for example D1.
- Close Properties dialog box
- click Design Mode (off)

-Select date. save your book, close and open
 

Bandy1

New Member
Joined
Dec 7, 2019
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
Welcome to the board!

Try the following:
- click the Developer tab.
- click Design Mode
- Select Date and Time Picker control
- To set the control properties, on the Developer tab, in the Controls group, click Properties.
You can also right-click the control, and then click Properties.

- The Properties dialog box appears. In the Linkedcell property type one cell , for example D1.
- Close Properties dialog box
- click Design Mode (off)

-Select date. save your book, close and open
Hi DanteAmor,

and thank you for your help.
I tried as you said but it did not work. There was an error message.
Do I need to assign the Date Picker to the cell I entered in LinkedCell?
If so, how do I link the Date Picker to that cell?
What am I doing wrong?
I have uploaded images to assist you
 

Attachments

  • 1.JPG
    1.JPG
    39.4 KB · Views: 8
  • 2.JPG
    2.JPG
    61.5 KB · Views: 10
  • 3.JPG
    3.JPG
    49 KB · Views: 9
  • 4.JPG
    4.JPG
    55.6 KB · Views: 7
  • 5.JPG
    5.JPG
    54.8 KB · Views: 7
  • 6.JPG
    6.JPG
    48.9 KB · Views: 6
  • 7.JPG
    7.JPG
    41.2 KB · Views: 6
  • 8.JPG
    8.JPG
    43.4 KB · Views: 5

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,593
Office Version
  1. 2007
Platform
  1. Windows
Test, first enter a date in G1 and then link the Date and Time Picker control to cell G1
 

Bandy1

New Member
Joined
Dec 7, 2019
Messages
4
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

Test, first enter a date in G1 and then link the Date and Time Picker control to cell G1
Sorry I'm pretty much a newbie, lol.
I enter 08/12/2019 in G1.
Then how do I link the Date and Time Picker control to cell G1?
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,593
Office Version
  1. 2007
Platform
  1. Windows
Sorry I'm pretty much a newbie, lol.
I enter 08/12/2019 in G1.
Then how do I link the Date and Time Picker control to cell G1?
Dont worry.
Repeat the same steps in post #2
 

Bandy1

New Member
Joined
Dec 7, 2019
Messages
4
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

Yeah,
Tried that but no luck
I'm just dumb...
Thanks DanteAmor
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,593
Office Version
  1. 2007
Platform
  1. Windows
It works for my version, and the last stored date is saved. This is weird.

Try this:

- Remove linked cell
- Put the following in event sheet

VBA Code:
Private Sub DTPicker1_Change()
  Range("G1").Value = DTPicker1.Value
End Sub

Private Sub Worksheet_Activate()
  DTPicker1.Value = Range("G1").Value
End Sub

SHEET EVENT
Right click the tab of the sheet you want this to work, select view code and paste the code into the window that opens up.

______________________________________________________________________
Put the following in ThisWorkbook

Note: Change "SheetD" for the name of your sheet.

VBA Code:
Private Sub Workbook_Open()
  Sheets("SheetD").DTPicker1 = Sheets("SheetD").Range("G1")
End Sub

ThisWorkbook EVENT
- Open the VB Editor (press Alt + F11).
- Over in the Project Explorer, double click on ThisWorkbook.
- In the white panel that then appears, paste the above code.
 

adambc

Board Regular
Joined
Jan 13, 2020
Messages
122
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
I'm trying to find a Date/Time Picker in Excel O365 32-bit that I can use in a UserForm - but can't find it anywhere!!!

Can anyone help me please?
 

Watch MrExcel Video

Forum statistics

Threads
1,113,903
Messages
5,544,974
Members
410,647
Latest member
LegenDSlayeR
Top