请高手帮忙改下代码!谢谢!急用
Const Path$ = "C:考试评分"'指定得分的统计文件路径
Dim sum As Single
'全局变量总分
Dim AverageScore As Single
'全局变量平均得分
Dim GroupNum As Integer
'全局变量记录组次
Private Sub CommandButton1_Click()
'清空得分
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Slide2.TotalScore.Caption = ""
'清空下一张幻灯片的最后总分
End Sub
Private Sub CommandTotal_Click()
'“最终得分”按钮
On Error GoTo er
Dim sum As Single
'将8个评委的分数相加得出总分sum
sum = sum + CSng(Text1.Text)
sum = sum + CSng(Text2.Text)
sum = sum + CSng(Text3.Text)
sum = sum + CSng(Text4.Text)
sum = sum + CSng(Text5.Text)
sum = sum + CSng(Text6.Text)
sum = sum + CSng(Text7.Text)
sum = sum + CSng(Text8.Text)
AverageScore = Format(sum / 8, "#.###")
'计算出最后得分(平均分),精确到小数点后3位
Slide2.TotalScore.Caption = AverageScore
'第二张幻灯片显示最后得分
If GroupNum>=1 AND GroupNum
页:
[1]