Forum

Notifications
Clear all

Date picker form

5 Posts
2 Users
0 Reactions
55 Views
(@gabzeng)
Posts: 3
Active Member
Topic starter
 

Hi all, 

I've been trying to create a date picker form using the method shown in the 9 July 2015 blog ( https://www.myonlinetraininghub.com/excel-date-picker).

I've encountered some errors when trying to input the date into the text boxes and have previously been asking Catalin for some help. 

Basically, the date is showing up as time. 

Any help would be appreciated!

Thanks in advance!

 
Posted : 24/02/2020 8:51 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Gabriel,

You had two pieces of code setting the value of Birthday.  The 2nd one set the value to a variable called cValue but this had no value so you ended up with 0 as your birthday i.e. 12:00:00AM.

Regards

Phil

 
Posted : 26/02/2020 3:01 am
(@gabzeng)
Posts: 3
Active Member
Topic starter
 

Hi Phil, 

 

Thanks for the solution!

I've managed to get the date working for Registration Date field as well. 

However, something weird happens. 

When the date is chosen for Registration Date, it all seems fine. But after I click to Save Date, the input changes to American date formatting. 

The Birthday field doesn't do this when saving the date. 

Any ideas as to why? 

 

Cheers, 

Gabriel

 
Posted : 26/02/2020 8:36 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Gabriel,

Similar problem.  You have 2 bits of code setting the reg date. 

In this sub your setting it to CValue after you'd set it to the date in the calendar.  So I've just commented out the 2nd line

Private Sub RegDate_Enter()

DatePickerForm.Show
'RegDate.Value = CValue

End Sub

Regards

Phil

 
Posted : 26/02/2020 8:58 pm
(@gabzeng)
Posts: 3
Active Member
Topic starter
 

Thank you so much!

It all works now!

 
Posted : 27/02/2020 2:54 am
Share: