2007-09-03 09:57:36no name *

...

Private Sub Command1_Click()


Dim Chinese As Integer ’國文成績
Dim English As Integer ’英文成績
Dim Math As Integer ’數學成績
Dim Accounting As Integer ’會計成績
Dim Diploma As Integer ’文書處理
Dim Count As Integer ’總分
Dim Average As Integer ’平均



Chinese = Val(Text1.Text)
English = Val(Text2.Text)
Math = Val(Text3.Text)
Accounting = Val(Text4.Text)
Diploma = Val(Text5.Text)

Label8.Caption = Chinese + English + Math + Accounting + Diploma
Label9.Caption = (Chinese + English + Math + Accounting + Diploma) / 5





If Label9 >= 60 Then
Label10.Caption = ”及格”
Else
Label10.Caption = ”不及格”

End If



End Sub