Chris Williamson
Board Regular
- Joined
- Oct 16, 2010
- Messages
- 83
Hi Guys,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
ffice
ffice" /><o
></o
>
<o
></o
>
I’ve got a user form with a few text boxes on it.<o
></o
>
TextBox4 is for a date to be entered in it.<o
></o
>
<o
></o
>
To assist the user to enter the date in the correct format I’ve got in the ‘TextBox4 properties Value field’ the text “dd mmm yyyy”. <o
></o
>
But some people are still inputting dates in the wrong format.<o
></o
>
<o
></o
>
Q) What would the vb macro code be if I wanted the user form to convert the date that is entered into the correct format when they tab to the next text box on the user form?<o
></o
>
<o
></o
>
The ideal format that I want is: dd mmm yyyy, <o
></o
>
So today’s date is: <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com
ffice:smarttags" /><st1:date Year="2012" Day="17" Month="5">18 May 2012</st1:date><o
></o
>
<o
></o
>
The incorrect formats that some people input are:<o
></o
>
<st1:date Year="2012" Day="17" Month="5">18/05/2012</st1:date><o
></o
>
<st1:date Year="2012" Day="17" Month="5">18/05/12</st1:date><o
></o
>
<st1:date Year="2012" Day="17" Month="5">18/5/12</st1:date><o
></o
>
18 may 12<o
></o
>
18 May 12<o
></o
>
<o
></o
>
Thanks for your help.<o
></o
>
<o
></o
>
Chris<o
></o
>




<o


I’ve got a user form with a few text boxes on it.<o


TextBox4 is for a date to be entered in it.<o


<o


To assist the user to enter the date in the correct format I’ve got in the ‘TextBox4 properties Value field’ the text “dd mmm yyyy”. <o


But some people are still inputting dates in the wrong format.<o


<o


Q) What would the vb macro code be if I wanted the user form to convert the date that is entered into the correct format when they tab to the next text box on the user form?<o


<o


The ideal format that I want is: dd mmm yyyy, <o


So today’s date is: <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com



<o


The incorrect formats that some people input are:<o


<st1:date Year="2012" Day="17" Month="5">18/05/2012</st1:date><o


<st1:date Year="2012" Day="17" Month="5">18/05/12</st1:date><o


<st1:date Year="2012" Day="17" Month="5">18/5/12</st1:date><o


18 may 12<o


18 May 12<o


<o


Thanks for your help.<o


<o


Chris<o

