I have 3 TextBoxes in my Project Form , textbox1 is for taking Maximum_Marks, TextBox2 is for Minimum_Marks and the textbox3 is for taking Obtained_Marks ,but i dont want my Obtained_Marks textbox should take value Greater than Maximum_Marks textbox1 value or Less Than Minimum_Marks textbox2 value. i am trying to get a guidance on it

I presume that the user enters numbers in all three textboxes then clicks a button to perform some action. In the button_click handler you get the numeric values from all three textboxes then do a comparison and display an error message if the Obtained_Marks value is outside the range. First you have to verify that each field is numeric. You can do that either by restricting entry to digits (there are several examples of how to do that in this forum), or by testing in code by

If Not IsNumeric(TextBox1.Text) Then
    MsgBox("Value of Maximum_Marks is not numeric")

Once you have validated the fields you can convert them to numbers (in this example, integers) by

CInt(TextBox1.Text)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.