Forcing english date format

S

Steve1154

Hi
I use a form that pulls in a range of dates from excel. I need date t
be in 28/2/06 type format. Only trouble is every time I shut and reope
the workbook the date comes in as 02/28/06.
To solve this I am currently having to go through control panel
regional settings,customise,date,and highlighting the longdate forma
dd:MM:yy (Which is already showing as active option)
How can I force excel to use this format automatically?

Nb the dates on the spreadsheet are already formatted to 28/02/06

This one has been causing me a headache for over 2 year now - I jus
discovered this forum so really hope someone knows the answer
Cheers
Stev
 
D

Dav

Have you tried setting a custom format of an English date dd/mm/yy, W
have the same problem, But sheets formated form the custom tab d
retain the same format when we reopen them. i guess its probably dow
to network settngs tho

regards

Da
 
S

Steve1154

I need something like
Sub UserForm_Initialize()
onopen longdate.format=dd/MM/yy

in the initialising sequence but I have tried this so many ways my
heads spinning

Steve
 
B

Bob Phillips

Do you set your date in VBA? If so, try casting it, CDate(Date).

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
S

Steve1154

Hi
Thanks for the idea, I've never heard of this befor. I just tried

Dim MyDate, MyShortDate
MyDate = "15 February, 2006"
MyShortDate = CDate(MyDate)

It accepts the code (thats good) but it has no effect

Steve
 
S

Steve1154

This just gets rejected

Dim MyDate, MyLongDate
MyDate = "15 February, 2006"
MyLongDate = CDate(dd / MM / yy)

Steve:confused:
 
Top