Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdproses_Click()
Dim a, b, c, d, e, f As Double
a = Val(txt1.Text)
b = Val(txt2.Text)
c = Val(txt3.Text)
d = Val(txt4.Text)
e = Val(txt5.Text)
f = Val(txt6.Text)
d = (a + b – c)
txt4.Text = d
e = (d * 0.1)
txt5.Text = e
f = (d – e)
txt6.Text = f
End Sub

Private Sub cmdulang_Click()
txt1.SetFocus
txt1 = “”
txt2 = “”
txt3 = “”
txt4 = “”
txt5 = “”
txt6 = “”
End Sub

Private Sub txt4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt5.SetFocus
End If
End Sub

Private Sub txt5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt6.SetFocus
End If
End Sub

Private Sub txt1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt2.SetFocus
End If
End Sub

Private Sub txt3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt4.SetFocus
End If
End Sub

Private Sub txt2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt3.SetFocus
End If
End Sub