Private Sub Command2_Click()
Dim ipsemester1 As Double
Dim semester1 As Integer
Dim pilihan1 As Integer
Dim nilai1 As Integer
Dim nilai2 As Integer
Dim nilai3 As Integer
nilai1 = Val(Text1.Text)
nilai2 = Val(Text2.Text)
nilai3 = Val(Text3.Text)
ipsemester1 = 0
pilihan1 = 0
semester1 = 0
If Option1.Value = True Then
semester1 = semester1 + nilai1
pilihan1 = pilihan1 + 1
End If
If Option4.Value = True Then
semester1 = semester1 + nilai2
pilihan1 = pilihan1 + 1
End If
If Option7.Value = True Then
semester1 = semester1 + nilai3
pilihan1 = pilihan1 + 1
End If
ipsemester1 = semester1 / pilihan1
Text4.Text = Format(ipsemester1, "#, ##0.0#")
End Sub
Tidak ada komentar:
Posting Komentar