storing values
Can anybody help!
I have created a userform with excel vba & in this user form the user is asked to enter various values when I run the process once the expected results are output into an excel spreadsheet. The problem I am having is allowing the user to add more than one set of values to create an accumulated total for each of the outputs. I.e. I want to be able to store the output variables & add to them.
I have tried various methods to do this but I am just learning the subject. One of my ideas is shown below.
Hrs = (Formulae that gives the hours goes here)
other code
other code
etc.
AcumHrs = (Formulae that gives the next set of hours goes here)
Hrs = AcumHrs + Hrs
The Hrs on the left of the '=' sign adds the previous 'Hrs' value, (on the right) to the 'AcumHrs' to give an accumulated value for the Hrs variable.
|