It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Running totals:

Moderator: dafunkymunky

Running totals:

Postby Lightyr46 on Sun Mar 27, 2011 10:43 pm

Hi Visual Studio 2010 problem,

I want to run a counter that counts days.

Then i want the counter to terminate the loop at 7days.

Then I want to run a continuous count of number per day.

Thus for example: Day1 = 20
Day2 = 34
Day3 = 6

Therefore,
Presently: counter = 3days
running total = 60

I think I have the daily counter code correct but check me anyway.
Const MAXVALUE = 7
counter = MAXVALUE + 1 (per iteration)

So my main problem is how do I add the Day1 number to the Day2 number in a
way that keeps a running total.

Thanks in advance
Light
Lightyr46
 
Posts: 1
Joined: Sun Mar 27, 2011 10:19 pm

Re: Running totals:

Postby sanjon on Thu Apr 28, 2011 9:27 pm

I would add another variable called totalDays and then add all the days to the variable.

ex.

Dim totalDays As Integer
totalDays += Day1
sanjon
 
Posts: 40
Joined: Sun Dec 05, 2010 6:20 pm


Who is online

Users browsing this forum: No registered users and 1 guest