Perkalian Dua Bilangan

sofi 1

  1. Hitung

Private Sub cmdbersih_Click()

txt1.SetFocus

txt1 = “”

txt2 = “”

txthasil = “”

End Sub

Private Sub cmdhtung_Click()

Dim a, b, hasil As Single

a = txt1.Text

b = txt2.Text

hasil = a * b

txthasil.Text = hasil

End Sub

Private Sub cmdkluar_Click()

Unload Me

End Sub

Private Sub txt1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txt2.SetFocus

End If

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s