View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
KM[_2_] KM[_2_] is offline
external usenet poster
 
Posts: 24
Default Forcing Date Entry

If you have text box you can use the IsDate function, I
use several functions to pull the locale date format of
the user but if you and your workbook are just based in
the US then just set a global string value of mm/dd/yy and
set your text box to this default value, itkind of acts as
a reminder to the user of what to type and on the _Exit
procdure of your text box you need to have something like
this

If Not IsDate(Me.txtBox) And Me.txtBox< mstrDateFormat
Then
gstrFrmMsg = "The date that you have entered is not a
date value."
MsgBox gstrFrmMsg, vbOKOnly Or vbInformation
Me.txtBox= mstrDateFormat
Me.txtBox.SelStart = 0
Me.txtBox.SelLength = Len(Me.txtBox)
Cancel = True
End If

hope this helps
regards
KM
-----Original Message-----
can't already have the /

no way to tell if the user complied or not

02/05/03

Did the user comply or not?

Use three textboxes - one for day, one for month, one for

year

--
Regards,
Tom Ogilvy

"rbaxter" wrote in

message
...
Anyone know the code to use in order to force a user to

fill in a
(text?)box with a date in the following format:

DD/MM/YY

If possible can the "/"s be already in place so that

only the spaces
can be filled in eg. [ / / ]

Thanks


---
Message posted from http://www.ExcelForum.com/



.