Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
textbox validation for date and condition
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
textbox validation for date and condition
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 "tkraju via OfficeKB.com" <u16627@uwe wrote in message news:85abf58b3f3ac@uwe... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
textbox validation for date and condition
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Textbox validation | Excel Discussion (Misc queries) | |||
Making a sound on condition of textbox | Excel Discussion (Misc queries) | |||
textbox validation | Excel Programming | |||
textbox value validation | Excel Programming | |||
textbox validation | Excel Programming |