Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Min and Max value in TextBox
Is there a way to accept only 2003 to current year in a text box?
(2003,2004,2005,2006 only now and in next year upto 2007) Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Min and Max value in TextBox
One way:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) If CInt(TextBox1.Value) < 2003 Or CInt(TextBox1.Value) Year(Now()) Then MsgBox "Invalid year" End If End Sub "Abdul" wrote: Is there a way to accept only 2003 to current year in a text box? (2003,2004,2005,2006 only now and in next year upto 2007) Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Highlight all Text in a Textbox when the textbox is selected | Excel Programming | |||
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys | Excel Programming | |||
Textbox Bug? Missing/delayed update of textbox filled via VBA | Excel Programming | |||
Textbox Bug? Missing/delayed update of textbox filled via VBA | Excel Programming | |||
How to move cursor from one textbox control to another textbox con | Excel Programming |