Dim a, b, c, x, y, z As Single a = ValueBox1.Value b = ValueBox2.Value c = ValueBox3.Value x = a y = a z = a If b < x Then x = b Else y = b z = b Endif If c < x Then x = c Endif If c < y Then y = c Else z = c Endif
ValueBox4.Value = x ValueBox5.Value = y ValueBox6.Value = z