Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional validation TUNGANA KURMA RAJU Excel Discussion (Misc queries) 2 June 4th 08 04:24 AM
Conditional Validation mojoshenpo Excel Worksheet Functions 3 July 29th 06 08:46 PM
Conditional Validation TTomSawyer Excel Worksheet Functions 1 August 12th 05 01:47 AM
Conditional Validation ! Shekhar Gupta Excel Programming 1 April 27th 05 11:48 PM
Conditional validation :-) Robert Excel Discussion (Misc queries) 1 February 18th 05 08:07 AM


All times are GMT +1. The time now is 07:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"