Convert date to number in userform textbox

K1600

Board Regular
Joined
Oct 20, 2017
Messages
153
I have a userform which has, amongst others, a textbox for the collection of a date. The date is selected from a date picker calendar and then put into the textbox.

I need to convert the selected date into number format and put it into a hidden textbox on my userform but I can't work out what code I would need to do it.

Thanks in advance for any help.
 

Some videos you may like

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

eduzs

Well-known Member
Joined
Jul 6, 2014
Messages
689
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Try cdbl(cdate(Userform1.TextBox1))
 

Watch MrExcel Video

Forum statistics

Threads
1,122,291
Messages
5,595,274
Members
413,984
Latest member
stikpet

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
Top