PROGRAM 4 PENJUMLAHAN MENGGUNAKAN ENTER


Private Sub Cmdhitung_Click()

txtjmlh = Val(Txtn1) + Val(txtn2) + Val(txtn3)
End Sub

Private Sub Cmdbatal_Click()
Txtn1 = ""
txtn2 = ""
txtn3 = ""
txtjmlh = ""
Txtn1.SetFocus
End Sub



Private Sub Cmdkeluar_Click()
Unload Me
End Sub
Private Sub Cmdlagi_Click()
Txtn1 = ""
txtn2 = ""
txtn3 = ""
txtjmlh = ""
Txtn1.SetFocus
End Sub

Private Sub txtn1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn2.SetFocus
End If
End Sub

Private Sub txtn2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn3.SetFocus
End If
End Sub

Private Sub txtn3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtjmlh = Val(Txtn1) + Val(txtn2) + Val(txtn3)

End If
End Sub

Komentar

Postingan populer dari blog ini

Smartwatch Nokia Steel Kini Punya Varian Edisi Terbatas

Kerjasama MediaTek dan Google Akan Mempermudah Produsen Merakit Smartphone Android

PROGRAM 3.6 BP1