Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Mr.Rick,
My 3rd question with same conditions(If Textbox2 value should be greater than TextBox10) Can I modify the code line to test the both test boxes,for " if textbox2 value should be greater than textbox1, with all the above conditions remains same. If Len(.Text)0 And .value TextBox1.value Then will this modification works or not/ Rick Rothstein (MVP - VB) wrote: I am probably missing something in your question, but why can't you simply test if the Text values of the two TextBoxes are equal or not (doesn't matter if the entry is numeric or not... if there's something in TextBox1, then it has to equal TextBox2... period)... Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) With TextBox2 If Len(.Text) 0 And .Text < TextBox1.Text Then MsgBox "Invalid entry! Entry must match archival value." Cancel = True .SelStart = 0 .SelLength = Len(.Text) End If End With End Sub Rick Mr.Rick, I have a some modification of my question,can you modify the code a bit [quoted text clipped - 54 lines] or corrects the entry by putting only numeric values. -- Message posted via http://www.officekb.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Validation subroutine for textboxes | Excel Programming | |||
Show Results in TextBoxes, ONLY if All TextBoxes have Data in them | Excel Programming | |||
format validation in UserForm textboxes | Excel Programming | |||
Addition code for 110 TextBoxes | Excel Programming | |||
Addition code for 110 TextBoxes | Excel Programming |