Userform Textbox Date has months and days reversed?!

AyurvedaPura

New Member
Joined
Jan 4, 2012
Messages
44
Hi

I have a userform with a textbox which displays a date from a userform calendar / function combo, displayed as mm/dd/yy - all good

I have a msgbox that then displays this textbox.value (mm/dd/yy), but as "dddd" & "mmmm dd yyyy" type-of-thing.

So today, displays in my textbox as 08/1/12 and should appear in the msgbox as "Wednesday August 01 2012" - but it appears as "Sunday January 08 2012" !!

So I've got a date formatted from a calendar (with a Date variable) as mm/dd/yy, displayed in a textbox as mm/dd/yy which is then read by a msgbox call to the textbox.value as dd/mm/yy

Very frustrating - how can I fix this? If I declare the date function public in the calendar form code and call it in the msgbox code would this work? or is this like taking a baseball bat to a franklin mint display?

Advice much appreciated, thanks

AP
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
My days, do i have to change the regional settings (I am in the uK - dd/mm/yyyy - but I need mm/dd/yy)??

Say it isn't so!
 
Upvote 0
OK, so i am using DateValue on the textbox, and this 'uses the default date value for Microsoft Excel'

How do I change the default date value? Please let it not be regional settings!!

AP
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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