MAXGENERATIONS=10,000 (constant declared at begining of program)
Generations = 10,000 (default; set when program starts)
Private Sub cmdGenerations_Click() 'allows user to change # of generations
Generations = InputBox("Enter number of generations:" & _
vbCrLf & "(Max = " & MAXGENERATIONS & ")", _
"Generations", MAXGENERATIONS)
If Generations < 1 Or Generations > MAXGENERATIONS Then Generations = MAXGENERATIONS
End Sub
If I input a negative number or a number > 10000, it stays there. The if statement should catch it and change it to 10k, but for some reason it doesn't. Any ideas?
Nate
Generations = 10,000 (default; set when program starts)
Private Sub cmdGenerations_Click() 'allows user to change # of generations
Generations = InputBox("Enter number of generations:" & _
vbCrLf & "(Max = " & MAXGENERATIONS & ")", _
"Generations", MAXGENERATIONS)
If Generations < 1 Or Generations > MAXGENERATIONS Then Generations = MAXGENERATIONS
End Sub
If I input a negative number or a number > 10000, it stays there. The if statement should catch it and change it to 10k, but for some reason it doesn't. Any ideas?
Nate