sealife24
新手上路
- 注册
- 2005-10-23
- 消息
- 107
- 荣誉分数
- 0
- 声望点数
- 0
Does someone can check the code for me? It's about display the highest and lowest score from the infinite inputbox,but why it doesn't work?? Inamed the input as the integer,but if i want to stop enter the score(click cancel of inputbox),it says error,but if i make it string, when i enter cancel,it'll end the inputbox and go back to the form,why is that?can someone tell me?
Private Sub cmdEnter_Click()
intcount = 1
Do
intScore = InputBox("Enter the score:", "Bowling score")
intcount = intcount + 1
Loop Until intScore = ""
End Sub
Private Sub cmdStatistics_Click()
If strScore > strLow Then
strScore = intLow
ElseIf strScore < strHigh Then
strScore = intHigh
End If
lblMessage.Caption = "The high score is " & strHigh & "," & "the low score is " _
& strLow & "."
End Sub
Private Sub cmdEnter_Click()
intcount = 1
Do
intScore = InputBox("Enter the score:", "Bowling score")
intcount = intcount + 1
Loop Until intScore = ""
End Sub
Private Sub cmdStatistics_Click()
If strScore > strLow Then
strScore = intLow
ElseIf strScore < strHigh Then
strScore = intHigh
End If
lblMessage.Caption = "The high score is " & strHigh & "," & "the low score is " _
& strLow & "."
End Sub