Link to home
Start Free TrialLog in
Avatar of dominica526
dominica526

asked on

A running Sub-Total

Hello Experts,

Is it possible to add a value to a global variable and have additional values append instead of replace? So that I can have a running total?

Thanks
Avatar of cachedVB
cachedVB

Hi dominica526,
You can have the global variable be an array and do just t hat, just place the number in the next element of the array each time
cachedVB
ASKER CERTIFIED SOLUTION
Avatar of JesterToo
JesterToo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perhaps I should have given a better example...

Public intGrandTotal As Integer

intGrandTotal = 15                             ' running total is 15
intGrandTotal = intGrandTotal + 10      ' running total is 25
intGrandTotal = intGrandTotal - 4        ' running total is 21
intGrandTotal = intGrandTotal + 7       ' running total is 28
intGrandTotal = intGrandTotal * 3       ' running total is 84      
Avatar of dominica526

ASKER

I think you are correct sir! Hummmm + intAnotherIncrementOrDecrement I would have never come-up with that, thanks!
You're very welcome, and thank you for the grade!

-- Lynn
Lynn,

Help!!! intAnotherIncrementOrDecrement only works on one computer!! What does it need installed to work??