P
Paul
Hi,
I've got a userform with different textboxes, I'm using the following code
to insert the dates into the textboxes and to validate that date B is not
less or equal to date A:
If ALLOCATION.ComButton3.Caption = "X" Then
ALLOCATION.TextBox21.Value = Calendar1.Day & TextBox1.Value & "Z" & n &
Calendar1.Year
ALLOCATION.TextBox151.Value = Calendar2.Day & TextBox2.Value & "Z" & m &
Calendar2.Year
frmCalendar.Hide
If ALLOCATION.TextBox151.Value < ALLOCATION.TextBox21.Value Or _
ALLOCATION.TextBox151.Value = ALLOCATION.TextBox21.Value Then
MsgBox "msg"
ALLOCATION.TextBox151.Value = ""
frmCalendar.Show
End If
Unload Me
ALLOCATION.ComButton3.Caption = "Y"
My problem is that when I have 141315ZMAR2008 as my first date (A) I'll get
the warningmessage if date B is 141315ZJUL2008, so for some way the code only
looks at the first part of the date, instead of the complete part.
Does anybody have an idea?
Cheers,
Paul
I've got a userform with different textboxes, I'm using the following code
to insert the dates into the textboxes and to validate that date B is not
less or equal to date A:
If ALLOCATION.ComButton3.Caption = "X" Then
ALLOCATION.TextBox21.Value = Calendar1.Day & TextBox1.Value & "Z" & n &
Calendar1.Year
ALLOCATION.TextBox151.Value = Calendar2.Day & TextBox2.Value & "Z" & m &
Calendar2.Year
frmCalendar.Hide
If ALLOCATION.TextBox151.Value < ALLOCATION.TextBox21.Value Or _
ALLOCATION.TextBox151.Value = ALLOCATION.TextBox21.Value Then
MsgBox "msg"
ALLOCATION.TextBox151.Value = ""
frmCalendar.Show
End If
Unload Me
ALLOCATION.ComButton3.Caption = "Y"
My problem is that when I have 141315ZMAR2008 as my first date (A) I'll get
the warningmessage if date B is 141315ZJUL2008, so for some way the code only
looks at the first part of the date, instead of the complete part.
Does anybody have an idea?
Cheers,
Paul