Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27389

VS 2010 need to create a running total

$
0
0
I am still in the learning process with VB 2012. I have to calculate a total for a purchase. Everytime the user enters a price and clicks the add to sale button, it adds that price to the running total until they hit the total button. In order to have this running total, do I have to use a for loop? Or can I do the following:

total = Quanity * Price
temptotal = temp + total

totaldue = temptotal

will this setup keep a running total in the temptotal variable for me? Is my logic correct?

**I am creating this in a separate class**

Thank you for the help in advance!!

Viewing all articles
Browse latest Browse all 27389

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>