I stuck here, got to make this dumb "bowling scores" program that is worthless. Anyhow how the heck do you find the high and low scores when scores are enter in a input box?
Printable View
I stuck here, got to make this dumb "bowling scores" program that is worthless. Anyhow how the heck do you find the high and low scores when scores are enter in a input box?
Try putting all the scores into an array or collection and just looping through like this(for a collection, use a for next loop for an array)
then you'll get the highgest and lowest scores in hiscore and loscore.Code:
dim lngHiscore as long
dim lngLoscore as long
dim vartemp as variant
lngloscore=500 ' number sufficiently high so all the scores are lower than it
lng hiscore=0
For each varTemp in collScores
if vartemp>lnghiscore then lnghiscore=vartemp
if vartemp<lngloscore then lngloscore=vartemp
Next varTemp
hope this helps.