How do I stop excel switching to US dates?

Oliver Dewar

Board Regular
Joined
Apr 17, 2011
Messages
201
Hi All,

I'm stuck!

I need my dates to display as UK dates DD/MM/YYYY.

I have a textbox on a userform in which the user inputs a date DD/MM/YYYY.

I have formatted the cell that the date get's put into as DD/MM/YYYY.

The problem is that the days and months are being swapped around when the date hits the cell... so:

07/12/2000 (7th of Dec 2000)

becomes 12/07/2000 (12 th of July 2000)

How can I stop this from happening?
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Excel can be a bit of a pain like that...........

I suggest forcing the date by always formatting it in the code, when you throw it over from the textbox:

Code:
......sheets("sheet2").range("A1").value = format(userform1.textbox1.value,"DD/MM/YYYY")
Not tested, but it should do the trick. Obviously you'll need to change the references etc, but it should give you the gist. Just post back if it doesn't do the trick - and include your code as well.
 
Upvote 0

Forum statistics

Threads
1,215,463
Messages
6,124,965
Members
449,201
Latest member
Jamil ahmed

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