Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to enable users to click on several times to increase the quantity of items by overwrite?

ShadyShady MalaysiaMember Posts: 1
edited December 2016 in Beginner VB

Dim intQuantity As Integer
Dim dblTotalPrice As Double
Dim intCountOverwrite As Integer

   Integer.TryParse(txtQ.Text, intQuantity)
   intQuantity += 1

   If cbFood.SelectedItem = ItemCostArray(0).strFood Then
       intCountOverwrite = intCountOverwrite + 1
       intQuantity = intQuantity + intCountOverwrite
       dblTotalPrice = intQuantity * 1.2
       strDisplay = ItemCostArray(0).strFood & ControlChars.Tab & intQuantity & ControlChars.Tab & dblTotalPrice.ToString("C2")
       ListBox1.Items.Add(strDisplay)

   End If
Sign In or Register to comment.