0
これは、テスト時に量と量のテキストボックスをゼロにリセットします。これをどのように計算するのですか?私の編集を想定しリストボックス値を計算する
Dim Number As Integer
txtNumber.Text = Number
Dim orchestra As Integer = 40
Dim mezz As Integer = 27.5
Dim general As Integer = 15
Dim balcony As Integer = 10
If lstSection.SelectedItem = "Orchestra" Then
txtAmount.Text = (Number * 40)
ElseIf lstSection.SelectedItem = "Mezzanine" Then
txtAmount.Text = (Number * 27.5)
ElseIf lstSection.SelectedItem = "General" Then
txtAmount.Text = (Number * 15)
ElseIf lstSection.SelectedItem = "Balcony" Then
txtAmount.Text = (Number * 10)
End If
おそらく 'Dim Number = Val(txtNumber.Text)'が必要ですか? – Slai