View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
funkymonkUK[_22_] funkymonkUK[_22_] is offline
external usenet poster
 
Posts: 1
Default Textboxs as dates


i change the code the code which i submitted just now to the below.

dt1 = DateValue(Left(TextBox5, 2) & "/" & Mid(TextBox5, 4, 2) & "/" &
Right(TextBox5, 4))
dt2 = DateValue(Left(TextBox7, 2) & "/" & Mid(TextBox7, 4, 2) & "/" &
Right(TextBox7, 4))
dt3 = DateValue(Left(TextBox8, 2) & "/" & Mid(TextBox8, 4, 2) & "/" &
Right(TextBox8, 4))

If dt1 dt2 Or dt2 dt3 Then
MsgBox "Dates are not in order please correct Section 5. Date of."
GoTo 1
End If


I looked at the code and realized that the data was putting into
mm/dd/yyyy instead of what the user was entering as dd/mm/yyyy so i
move the left(textbox5,2) which refers to the date as well as the
mid(textbox5,2) around as that was refering to month, now it seems to
be working 100%

Thanks for your help :)


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=368692