0

我在 1 个标签中显示 3 个单选按钮时遇到了一些问题,在该标签上选择了单选按钮,所以我有 3 个单选按钮,

单选按钮名称:

Single
Season
Flex

因此,如果选择的单选按钮 1 显示在 lblReceiptAns.Text = "Option: " 中,

Select Case True
  Case radSingle.Checked
    Pricez = CDbl(txtTickets.Text) * SINGLETICKETS
    TotalPricce = Pricez
  Case radSeason.Checked
    Pricez = CDbl(txtTickets.Text) * SEASONTICKCETS
    TotalPricce = Pricez
  Case radFlexPack.Checked
    Pricez = CDbl(txtTickets.Text) * FLEXPACK
    TotalPricce = Pricez
End Select

If txtVenue.Text = "STADIUM" Then
  lblReceiptAns.Visible = True
  lblReceiptAns.Text = "Option: " & 
Else
4

1 回答 1

1

我会创建一个新的模块级字符串变量 - Say ,然后在模块RadioButtonSelected中设置它的值。RadioButton_CheckChanged

然后,您只需:

lblReceiptAns.Text = "Option: " & RadioButtonSelected
于 2012-11-15T22:35:41.373 回答