Hi John,
Thanks for the replies but the application i use sometimes uses dates
going very far back and the calender form is long-winded for this
purpose
In that case, use my first suggestion and format the user's entry as you
want / need it.
We have this program at work where it treats the date box as 3 seperate
number sections so if the date was "25/02/2005", 25 would be highlighted
and you could use the up and down keys to move to 26 or 24 then press
the right key and it would move to "02" etc...
Replace your textbox with three comboboxes. Use the Userform initialize
event to fill the textboxes with the required values: 1-31 for the day box;
1 to 12 for the month box; in the year box include only the years you
require.
Add suitable identification labels and construct the required date, in your
code, from the three separate input values.
---
Regards,
Norman
"johncassell"
wrote in message
...
Thanks for the replies but the application i use sometimes uses dates
going very far back and the calender form is long-winded for this
purpose.
We have this program at work where it treats the date box as 3 seperate
number sections so if the date was "25/02/2005", 25 would be highlighted
and you could use the up and down keys to move to 26 or 24 then press
the right key and it would move to "02" etc...
Is there a way I could replicate this as it is exactly what I need. At
the moment I am using this code for the date1.change function but would
love it if i could get the code above working.
Public Sub Date1_Change()
Select Case Len(Date1.Text)
Case 2, 5
Date1.Text = Date1.Text & "/"
End Select
End Sub
but this forces the user to re-type the whole date.
thanks again for your original replies!!
--
johncassell
------------------------------------------------------------------------
johncassell's Profile:
http://www.excelforum.com/member.php...o&userid=25016
View this thread: http://www.excelforum.com/showthread...hreadid=391628