tugas 2

Untitled

Private Sub Cmdbatal_Click()

Textkb.SetFocus

Textkb = ” ”

Textnb = ” ”

Textnpn = ” ”

Textnp = ” ”

Texttt = ” ”

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdlagi_Click()

Textkb.SetFocus

Textkb = ” ”

Textnb = ” ”

Textnpn = ” ”

Textnp = ” ”

Texttt = ” ”

End Sub

 

 

Private Sub Textkb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Textnb.SetFocus

End If

End Sub

Private Sub Textnb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Textnpn.SetFocus

End If

End Sub

 

Private Sub Textnp_KeyPress(KeyAscii As Integer)

 

If KeyAscii = 13 Then

Texttt.SetFocus

End If

End Sub

 

Private Sub Textnpn_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Textnp.SetFocus

End If

End Sub

nmer2

 

Private Sub Cmdbh_Click()

bil1.SetFocus

bil1.Text = “”

bil2.Text = “”

bil3.Text = “”

 

End Sub

 

Private Sub Cmdht_Click()

Dim A, B, C As Single

A = bil1.Text

B = bil2.Text

C = A * B

bil3.Text = C

 

End Sub

 

Private Sub Cmdkr_Click()

Unload Me

End Sub

 

Private Sub bil1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

bil2.SetFocus

End If

 

End Sub

 

 

Private Sub bil2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim A, B, C As Single

A = bil1.Text

B = bil2.Text

C = A * B

bil3.Text = C

End If

 

End Sub

nmer4

Private Sub Cmd1_Click()

Dim A, B, C As Double

txti.Text = Val(txtR.Text) * 0.1

txtz.Text = Val(txtR.Text) – Val(txti.Text)

End Sub

 

Private Sub Cmd2_Click()

txtR.Text = “”

txti.Text = “”

txtz.Text = “”

End Sub

 

Private Sub Cmd3_Click()

End

End Sub

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s