| | |
adding totals in listboxes
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
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!
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

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
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.
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.
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: multiform windows appliction in VB . NET
- Next Thread: Building D.L.L in Matlab
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






