i have problem about if else code in my program.
i also have made many changing in this code but still i didn't get the result that i want.
my program is about vending machine.
here is the code:
Private Sub btnpepsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnpepsi.Click
TextBox2.Text = "RM 2.50"
Dim pepsi As Double
Dim amount As Double
If pepsi < 10 Then
ListBox1.Items.Add("Pepsi")
If displayText.Text > TextBox2.Text Then
amount = displayText.Text - TextBox2.Text
ListBox1.Items.Add("Your balance: " & amount & ".")
End If
Else
TextBox2.Text = "Sold out"
ListBox1.Items.Add("Sold out")
End If
End Sub