Private Sub btnEOD_Click
' My issue here is that when the items in my list box are being added it doesn't them together (Decx = decx + decSubTotal)
' It is multiplying the last entry by the amount of entries entered. (All entries are ranndom and vary in quantity. I am trying to make an end of day sales total.)
decItemCount = CDec(lstTotalSales.Items.Count)
Do Until decItemCount = 0
decItemCount -= 1
decx = decx + decSubTotal
Loop
strX = decx.ToString("C")
lblX.Text = strX
' This part adds the second numerical variable in the list box
decItemCount2 = CDec(lstTotalSales.Items.Count())
Do Until decItemCount2 = 0
decItemCount2 -= 1
decY = decY + decTotal
Loop
strY = decY.ToString("C")
lblY.Text = strY
End Sub
Last edited by a moderator: