UserForm including TextBox with date (UK format)

J

John Elink

Hello

I have database which includes also dates in UK format (dd.mm.yyyy). I
am able to display everything using UserForm with TextBoxes, but dates
are displayed in US format (mm/dd/yyyy).
I am able to change that when I leave the TextBox where is the date
using the following procedure

Private Sub TextBox13_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim dt As Date
dt = TextBox13.Text
TextBox13.Text = Format(dt, "dd.mm.yyyy")
End Sub

but the question is - is there some way to display date in UK format
immediately when UserForm with the TextBox including date is
displayed? (after UserForm.Show)? so there is no need to go into the
TextBox with date?

Thanks for the comments
Regards
Johny
 
B

Bob Phillips

John,

Why don't you also format the textbox when you load it?

Texbox1.Text = Format(theDate,"d.mm.yyyy")

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
J

John Elink

Bob

works fine, thanks a lot :)

Regards
Johny

Bob Phillips said:
John,

Why don't you also format the textbox when you load it?

Texbox1.Text = Format(theDate,"d.mm.yyyy")

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top