P 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

Apple akhirnya sediakan jack earphone lewat dongle khusus iPhone 7

PROGRAM 6 TUGAS 2 BP1

HOME TEKNOLOGI Kemenkominfo akan Panggil Google dan Telegram Terkait GIF WhatsApp