Convert date to number in userform textbox

K1600

Board Regular
Joined
Oct 20, 2017
Messages
70
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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

eduzs

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

Watch MrExcel Video

Forum statistics

Threads
1,112,814
Messages
5,542,649
Members
410,566
Latest member
Jonniehoffman
Top