Private Sub Command1_Click()
Text3.Text = (Val(Text1.Text) + Val(Text2.Text)) / 2
If Text3.Text >= 85 Then
Text4.Text = "Sangat Memuaskan"
ElseIf Text3.Text >= 75 Then
Text4.Text = "Cukup Memuaskan"
ElseIf Text3.Text >= 65 Then
Text4.Text = "Memuaskan"
Else
Text4.Text = "Kurang Memuaskan"
End If
Command1.Caption = "&Hitung Lagi Yaa"
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text1.SetFocus
End Sub
Private Sub Command3_Click()
x = MsgBox("Keluar Program?", vbExclamation + vbOKCancel, "info")
If x = vbOK Then
z = MsgBox("Yakin nih mau Keluar?", 16, "info")
If z = vbOK Then
End
End If
End If
End Sub
Private Sub Form_Activate()
Text1.SetFocus
End Sub
0 komentar