thank you !!
Harald Staff wrote:
This is just as much a When question, you must do everything after entry is
done:
Private Sub CommandButton1_Click()
Dim DT As Date
On Error Resume Next
DT = DateValue(Me.TextBox1.Text)
Select Case DT
Case 0 To DateSerial(1910, 1, 1)
MsgBox "no good"
Me.TextBox1.Text = ""
Me.TextBox1.SetFocus
Case Date + 1 To Date + 1000000
MsgBox "no good"
Me.TextBox1.Text = ""
Me.TextBox1.SetFocus
Case Else
MsgBox DT
End Select
End Sub
How to validate a textbox entry(userform) for date entry and not be
greater
than today's date.
--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200806/1