Private Sub Apple_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Apple.Click Dim MyItem As ListViewItem Dim A As Single = 5 If txtDisplay.Text = "" Then 'txtDisplay is a textbox where I put number of items the customer is purchasing. MyItem = ListView1.Items.Add("Apple 1 @ $5", 0) MyItem.SubItems.Add(A) lblTotal.Text = Val(lblTotal.Text) + Val(A) Else AnswerNumber = A * txtDisplay.Text MyItem = ListView1.Items.Add("Apple " & txtDisplay.Text & " @ $5", 0) MyItem.SubItems.Add(AnswerNumber) lblTotal.Text = Val(lblTotal.Text) + Val(AnswerNumber) End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)