Excel VBA Date and Time Picker

doeljeen

New Member
Joined
May 22, 2018
Messages
2
Hi all, I am a new member here but I have visited this forum before to look for helpful solutions.

Sadly, I cannot seem to find a thread for this one: my date and time picker outputs not dates but numbers albeit not random, and I do not know how to make it display real dates.

When I pick today's date(5/22/2018) it outputs 43242, when I pick yesterday's date(5/21/2018), it outputs 43241. I am very new to coding in VBA and I have no idea how to fix this. Any help would be greatly appreciated. Thanks.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Re: Need Help: Excel VBA Date and Time Picker

Hi all, I am a new member here but I have visited this forum before to look for helpful solutions.

Sadly, I cannot seem to find a thread for this one: my date and time picker outputs not dates but numbers albeit not random, and I do not know how to make it display real dates.

When I pick today's date(5/22/2018) it outputs 43242, when I pick yesterday's date(5/21/2018), it outputs 43241. I am very new to coding in VBA and I have no idea how to fix this. Any help would be greatly appreciated. Thanks.
That number is the number of days offset from "date 0"... to convert it to a recognizable date, apply the CDate function to the output value.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,428
Members
449,083
Latest member
Ava19

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