Hey ANG, how's it going? :c-smile:
By summing numbers, do you mean using Sigma and summing a series of numbers? Like this:
If so, the math is a little difficult for me to remember. :c-^_^: From the looks of it, it looks like your program would have 2 textboxes with 1 labeled Starting Number and the other Ending Number and a button that says Calculate. From there you could use a Do loop to do the calculations, so you're right about that. But I'm not sure the code inside your do loop is doing what it's supposed to be doing.
I visited
Summation - Wikipedia, the free encyclopedia to refresh my memory on summation, and they include a portion of using programming languages to perform summation problems. Here's their VB portion (might be outdated):
Sum = 0
For I = M To N
Sum = Sum + X(I)
Next I
They use a For loop instead, but I'm sure it's possible with a Do loop as well.
If I'm correct, you could have a starting number of 1 and an ending number of 100 and the total would be 5050 because 1 + 2 + 3 + 4 + 5 ... + 100 = 5050 and that is the basic principle of summation.
Personally, I'm very lazy and I just used the formula:
iSolution = ((iEnd * iEnd) + iEnd) / 2
But since you're using a Do loop you'll have to break the mathematics down into steps. I've got to go to sleep now, but if this isn't solved by tomorrow I'll help you out more. :c-grin:
Bound