Wednesday, November 28, 2018

TUGAS 1.3 (Perkalian Dua Bilangan Dan Enter untuk menampilkan Hasil)


Private Sub CMDBERSIH_Click()
TXTN1.SetFocus
TXTN1 = ""
TXTN2 = ""
TXTN3 = ""
End Sub

Private Sub CMDHITUNG_Click()
TXTN3 = Val(TXTN1) * Val(TXTN2)
End Sub

Private Sub CMDKELUAR_Click()
Unload Me
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 = Val(TXTN1) * (TXTN2)
End If
End Sub

1 comment: