LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 449
Default Date textboxe in userforms

Don't do this please. Don't prompt "Invalid date entry" on an annoying modal
msgbox just because the user entered a four digit year or forgot a leading
zero, your users will hate the application with good reasons.
There are several valid date formats and you should accept as many as
possible. Do

Dt = Datevalue(Me.Textbox1.Text)

and it accepts June 1, 12/31/08 and multiple others that makes sense in the
user's country. Your validation should be if the date is later than someday
reasonable or if Datevalue errs.

HTH. Best wishes Harald


"nir020" wrote in message
...
I am creating a userform in excel,

I need to create a user inputs into a which a valid date can only be
entered.

The required Date Format is "dd/mm/yy".

Can someone show me how to do this?


 
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
Date and Time Formats in UserForms Zani Excel Programming 2 January 13th 06 04:22 AM
UserForms bennyob Excel Discussion (Misc queries) 4 November 7th 05 01:58 PM
Userforms restrepoblessin Excel Programming 1 September 12th 05 04:26 PM
Problems with date format in userforms Brian C[_2_] Excel Programming 5 April 27th 04 02:16 PM
Userforms Gary[_8_] Excel Programming 1 August 18th 03 03:26 PM


All times are GMT +1. The time now is 12:36 PM.

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

About Us

"It's about Microsoft Excel"