|
-
September 15th, 2001, 10:46 AM
#1
Adding Array Elements
Is there a way to add array elements in a loop instead of like this.
TotalDays = Days(1) + Days(2) + Days(3) + Days(4) + Days(5) + Days(6) + Days(7) + Days(8) + Days(9) + Days(10) + Days(11) + Days(12)
Days of course is an array with the days number assigned in other parts of the program. A loop would be much neater.
THANKS RSH
-
September 15th, 2001, 12:03 PM
#2
Re: Adding Array Elements
Dumb question
For D = 1 To 12
TotalDays = TotalDays + Days(D)
Next D
73 RSH
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|