I have an array of 3 option buttons Option1(0), Option(1) and Option(2) and a textbox txtNum
Depending on which option button is chosen and what number is input into text box, I want to write a select case: (But I can't see where I'm going wrong! Any hints or tips folks?
appreciation for any commentsCode:Private Sub cmdSubmit_Click() Dim Wholesale as String Dim price As String Dim Total As Integer Select Case Wholesale ' Wholesale is the Caption of Option1(0) Case "1" If txtNumRequired <= 5 Then price = 50 Total = txtNumRequired * price End If Case "2" If txtNumRequired >= 6 And txtNumRequired <= 10 Then price = 45 Total = txtNumRequired * price End Select lblDisplayType.Caption = Option1(0).Tag lblDisplay.Caption = "You ordered " + txtNumRequired + " Items" '+ "The cost will be " + Total lblDisplayPrice.Caption = Total End Sub




Reply With Quote