hi
i want to write a program having three text box in each text box i wanna right a number and when i click a button i want to show in a message box the the smallest number first followed by the larger number and last the largest using the if condition
so far i made it display the smallest and first and the largest and last but how should i display the larger number in between the two ?

What's the difference between "the largest" and "the larger"?

ok i have three text box
in the first one i wrote number 3 -> smallest number
in he second one i wrote number 10 -> largest
and in the 3rd one i wrote number 5 - > larger
when i click a button i made a message box show with "3, ,10"
i need to make the larger number display in the middle but its not working

i'm pretty sure the smallest and the largest are in variables, just try something like that :

If smallest = TextBox1.Text And largest = TextBox2.Text Then
            larger = TextBox3.Text
ElseIf smallest = TextBox1.Text And largest = TextBox3.Text Then
            larger = TextBox2.Text
ElseIf smallest = TextBox2.Text And largest = TextBox1.Text Then
            larger = TextBox3.Text
ElseIf smallest = TextBox2.Text And largest = TextBox3.Text Then
            larger = TextBox1.Text
ElseIf smallest = TextBox3.Text And largest = TextBox1.Text Then
            larger = TextBox2.Text
ElseIf smallest = TextBox3.Text And largest = TextBox2.Text Then
            larger = TextBox1.Text

yep it worked but it worked more like

if smalles = string.format (textbox) and largest = string.format (textbox2) then
larger = string.format (textbox3) 
'and so on..

thanks for the help :)

I thought you were new to VB.net so i wanted to make it the easiest to understand.
Don't forget to mark this question as "Solved" ;)

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.