adding totals in listboxes

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Feb 2002
Posts: 12,056
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 127
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: adding totals in listboxes

 
0
  #11
Nov 10th, 2003
I'm a little confused. I haven't looked at VB in a a bunch of years, but that code you just posted looks right? The only help I can offer is to DIM your global variables in Option Explicit. It seems you have them all declared upon hitting the "Save" button. This resets the value of curOrderTotal back to 0 each time the Save button is pressed. (So essentially you'er saying curOrderTotal = 0 + curTotal each time, which is why it's not accumulating.

I THINK, ANYWAYS! I haven't looked at VB since 10th grade and I'm now a college senior!
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 793
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Solved Threads: 26
Team Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: adding totals in listboxes

 
0
  #12
Nov 11th, 2003
Dani is write, but I would stay away from Global variables. Nasty, and prof's don't usually like seeing them. IMHO and Experience.

But in saying that, maybe you need to create a global variable called curTotal, and have it accumulate each time you process and item. Or have it stay in the save button, but recall it and store it to the file each time you add an item.
Assistant Manager, Pharmacy Informatics
Wordpress Learning Blog
Updated : ASP.Net Login Code
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC