For program to work, you select one of two radio buttons and get a different calculation based on each...
I have tried every form of algebraic greater then, less then, etc. When I run the program and select retailer (bolded and underlined code), any number above 10 calculate to the number that is supposed to be for the numbers 4 to 9. What am I doing wrong? As requested, I wrote the multiplication outside of the select case structure... Thank you!
I have tried every form of algebraic greater then, less then, etc. When I run the program and select retailer (bolded and underlined code), any number above 10 calculate to the number that is supposed to be for the numbers 4 to 9. What am I doing wrong? As requested, I wrote the multiplication outside of the select case structure... Thank you!
Code:
Public Class Form1 Private Sub exitButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles exitButton1.Click Me.Close() End Sub Private Sub submitButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles submitButton1.Click Dim wholesale As String Dim inputquantity As Integer Dim outtotal As Integer Dim retailer As String Dim numx As Integer wholesale = wholesaleRadioButton1.Checked retailer = retailerRadioButton2.Checked inputquantity = unitsNeededTextBox1.Text Integer.TryParse(totaloutputLabel2.Text, outtotal) Select Case True Case wholesale If inputquantity <= 4 Then numx = 10 ElseIf inputquantity >= 5 Then numx = 9 End If Case retailer [B][U]If inputquantity <= 3 Then numx = 15 ElseIf 4 > inputquantity < 9 Then numx = 14 ElseIf inputquantity >= 10 Then numx = 13[/U][/B] End If End Select outtotal = numx * inputquantity totaloutputLabel2.Text = outtotal End Sub End Class
Comment