Dim VTotalHarga, VTotalJumlah As Integer
Private Sub Command1_Click()
If MsgBox("Anda Yakin", vbYesNo, "Exit") = vbYes Then
End
End If
End Sub
Private Sub Form_Load()
TotalHarga.Enabled = True
JumTotal.Enabled = False
End Sub
Private Sub Total()
VTotalHarga = (Val(HargaBuku.Text) * Val(JumlahBuku.Text)) + (Val(HargaPen.Text) * Val(JumlahPen.Text)) + (Val(HargaPensil.Text) * Val(JumlahPensil.Text))
VTotalJumlah = Val(JumlahBuku.Text) + Val(JumlahPen.Text) + Val(JumlahPensil.Text)
TotalHarga.Text = VTotalHarga
JumTotal.Text = VTotalJumlah
End Sub
Private Sub HargaBuku_Change()
Call Total
End Sub
Private Sub HargaPen_Change()
Call Total
End Sub
Private Sub HargaPensil_Change()
Call Total
End Sub
Private Sub JumlahBuku_Change()
Call Total
End Sub
Private Sub JumlahPen_Change()
Call Total
End Sub
Private Sub JumlahPensil_Change()
Call Total
End Sub
Private Sub JumTotal_Change()
Call Total
End Sub
Private Sub TotalHarga_Change()
Call Total
End Sub
0 komentar:
Posting Komentar