Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional validation
On a userform textbox1,in the same userform on multipage 1 textbox2 is there.
I want to validate textbox2 : If textbox1 text is equal to "PAID" then entry in textbox2 is not required,skip the entry and goto next tabstop.If textbox1 text is equal to "DUE",validate the textbox2 for a number(text) equal to 1000. Data entry is is not must,can be left blank,but if entered it should be a number(text) 1000. I have tried with Private Sub Textbox2_Exit(ByVal Cancel As MSForms. ReturnBoolean) , but could not succeed.Thanks in anticipation. -- Message posted via http://www.officekb.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional validation
hi,
you could use code like this in TextBox2_Exit If TextBox1 = "DUE" Then If TextBox2 < "" Then If TextBox2 < "1000" Then MsgBox "enter 1000" Cancel = True End If End If End If but this event fires only if you change to a control on the same page of the multipage. eventually, you need more/other events for the validation, e.g. Multipage_Exit stefan On 9 Jun., 04:45, "tkraju via OfficeKB.com" <u16627@uwe wrote: On a userform textbox1,in the same userform on *multipage 1 textbox2 is there. I want to validate textbox2 : If textbox1 text is equal to "PAID" then entry in textbox2 is not required,skip the entry and goto next tabstop.If textbox1 text is equal to "DUE",validate the textbox2 for a number(text) equal to 1000. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
conditional validation | Excel Discussion (Misc queries) | |||
Conditional Validation | Excel Worksheet Functions | |||
Conditional Validation | Excel Worksheet Functions | |||
Conditional Validation ! | Excel Programming | |||
Conditional validation :-) | Excel Discussion (Misc queries) |