Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a text box in a user form that has the user put in a date. I want the text box to change the format mm/dd/yyyy in the text box if the user puts the date in like this 41304 when they tab or click to the next textbox it would format the date to this 04/13/04. I am not sure how to do this. Help would be greatly appreciated
Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
use the change or afterupdate event of the textbo
and do this: dim MyDate as Varian MyDate = Me.Textbox_Nam if isdate(MyDate) the Me.Textbox_Name.text = format( MyDate,"mm/dd/yy" end i ----- Tim wrote: ---- I have a text box in a user form that has the user put in a date. I want the text box to change the format mm/dd/yyyy in the text box if the user puts the date in like this 41304 when they tab or click to the next textbox it would format the date to this 04/13/04. I am not sure how to do this. Help would be greatly appreciated Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
or just ues the mask property of ur textbox to control how the user inputs the date
|
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tim,
this needs some rules. Is 11204 11th Feb 2004, or 1st Dec 2004? Once you have the rules, it will be a simple matter of formatting with MID function etc. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Tim" wrote in message ... I have a text box in a user form that has the user put in a date. I want the text box to change the format mm/dd/yyyy in the text box if the user puts the date in like this 41304 when they tab or click to the next textbox it would format the date to this 04/13/04. I am not sure how to do this. Help would be greatly appreciated. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
UserForm text will not wrap | Excel Discussion (Misc queries) | |||
Text box on userform | Excel Programming | |||
Userform and Text Box | Excel Programming | |||
userform text boxes | Excel Programming | |||
Userform text box | Excel Programming |