Tugas 5 Kalkulator Tidak Menggunakan Keypress
Option Explicit
Private Sub Cmdhitung_Click()
Txttotal1 = Val(Txtn1) + (Txtn2)
txttotal2 = Val(Txtn3) / (Txtn4)
txttotal3 = Val(Txtn5) - (Txtn6)
txttotal4 = Val(Txtn7) * (Txtn8)
End Sub
Private Sub Cmdbatal_Click()
Txtn1 = ""
Txtn2 = ""
Txtn3 = ""
Txtn4 = ""
Txtn5 = ""
Txtn6 = ""
Txtn7 = ""
Txtn8 = ""
Txttotal1 = ""
txttotal2 = ""
txttotal3 = ""
txttotal4 = ""
Txtn1.SetFocus
End Sub
Private Sub Cmdlagi_Click()
Txtn1 = ""
Txtn2 = ""
Txtn3 = ""
Txtn4 = ""
Txtn5 = ""
Txtn6 = ""
Txtn7 = ""
Txtn8 = ""
Txttotal1 = ""
txttotal2 = ""
txttotal3 = ""
txttotal4 = ""
Txtn1.SetFocus
End Sub
Private Sub Cmdkeluar_Click()
Unload Me
End Sub
Tidak ada komentar:
Posting Komentar