Results 1 to 2 of 2

Thread: Brain cramp

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    18
    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?

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    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)

    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
    then you'll get the highgest and lowest scores in hiscore and loscore.

    hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width