text 1 is A, text 2 is C, and text 3 is the result.Code:Dim A Dim B Dim C Private Sub Command1_Click() A = Text1.Text C = Text2.Text B = A / 2 Select Case C Case Is > B Text3.Text = (C - B) + 5 Case Is < B Text3.Text = (C + B) + 5 Case Else MsgBox ("they must be equal") End Select End Sub
bob




Reply With Quote