Looping through valid inputs (VBA)

D

DesireeStar

How to write a simple program to:

Test all possible combinations of adding two numbers that range from
1-100 each (10,000 total possible combination) using some sort of
looping structure.

My guess (and I'm new at programming) is that there will be some sort
of nested loops but the logic escapes me.
 
D

DesireeStar

Dim intA As Integer
Dim intB As Integer


For intA = 1 To 100
For intB = 1 To 100
Me!txtTotal = BlackBox(intA, intB)
Next
Next

How can I tell if it's gone through all 10,000 possible combinations
for testing purposes? Do I need to put it inside another for loop?
 
D

DesireeStar

DesireeStar said:
Dim intA As Integer
Dim intB As Integer


For intA = 1 To 100
For intB = 1 To 100
Me!txtTotal = BlackBox(intA, intB)
Next
Next

How can I tell if it's gone through all 10,000 possible combinations
for testing purposes? Do I need to put it inside another for loop?


Resolved.
 
Top