Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Date and Time Formats in UserForms

I can insert the current date and current time into textboxes on a UserForm,
what I need to do is completely set the format so that if the user tries to
enter the date or time in the wrong format the Userform wont accept it and
gives them a message saying so.

I want to use dd/mm/yy for the date and hh:mm (24 hour clock) for the time.

Any ideas - am stuck now!

--
Zani
(if I have posted here, I really am stuck!)

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Date and Time Formats in UserForms

There are no validation settings for these controls. You would have to use
the control's built in events to execute code that does the validation.

--
Regards,
Tom Ogilvy


"Zani" wrote in message
...
I can insert the current date and current time into textboxes on a

UserForm,
what I need to do is completely set the format so that if the user tries

to
enter the date or time in the wrong format the Userform wont accept it and
gives them a message saying so.

I want to use dd/mm/yy for the date and hh:mm (24 hour clock) for the

time.

Any ideas - am stuck now!

--
Zani
(if I have posted here, I really am stuck!)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Date and Time Formats in UserForms

Thanks Tom. Sorry for being ignorant here, but could you show me an example
of what you mean, I'm not sure I understand - maybe my brain is just fried!
--
Zani
(if I have posted here, I really am stuck!)



"Tom Ogilvy" wrote:

There are no validation settings for these controls. You would have to use
the control's built in events to execute code that does the validation.

--
Regards,
Tom Ogilvy


"Zani" wrote in message
...
I can insert the current date and current time into textboxes on a

UserForm,
what I need to do is completely set the format so that if the user tries

to
enter the date or time in the wrong format the Userform wont accept it and
gives them a message saying so.

I want to use dd/mm/yy for the date and hh:mm (24 hour clock) for the

time.

Any ideas - am stuck now!

--
Zani
(if I have posted here, I really am stuck!)




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I convert date/time formats differently? Ruidil Excel Discussion (Misc queries) 4 June 6th 09 08:22 PM
What exactly does the asterisk mean in the Date/Time formats? JB Excel Discussion (Misc queries) 1 July 26th 06 02:39 AM
formulas using date/time formats returning #value Liesel Excel Discussion (Misc queries) 7 June 20th 06 06:13 AM
Multiple Date/Time Formats colin Excel Worksheet Functions 2 October 7th 05 11:40 AM
US vs UK date and time formats Stephen Glynn Excel Discussion (Misc queries) 2 February 24th 05 05:58 PM


All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"