Dear poeple,
I'm currently working in Excell 2013 and made a VBA form with a manual input of the date (existing from day, month and year in three separate combo boxes)
Now I'm using the following code to put the day, month and year together
As you can see I also added the number format I want. But know when I look in my cell it's says the text(for example): 04-January-2014
But I want this to be in the format 1-1-2014, as the NumberFormat above.
Now when I select the text in the cell manually and press enter the text changes to 1-1-2014 so the format does change but I still need to give a manual enter.
Could someone help me out to change this style automatically without me pressing enter haha.
Thank you very much.
I'm currently working in Excell 2013 and made a VBA form with a manual input of the date (existing from day, month and year in three separate combo boxes)
Now I'm using the following code to put the day, month and year together
Code:
Worksheets("Factuur").Range("C11") = Me.CB_Day.Value & "-" & Me.CB_Month.Value & "-" & Me.CB_Year.Value
Worksheets("Factuur").Range("C11").NumberFormat = "d-m-yyyy"
As you can see I also added the number format I want. But know when I look in my cell it's says the text(for example): 04-January-2014
But I want this to be in the format 1-1-2014, as the NumberFormat above.
Now when I select the text in the cell manually and press enter the text changes to 1-1-2014 so the format does change but I still need to give a manual enter.
Could someone help me out to change this style automatically without me pressing enter haha.
Thank you very much.