TUGAS 4 yang ke 1

LINTANG1

Private Sub cboKode_Click()

Dim mt, hs, TB As Integer

Select Case cbokode.Text

Case “Apple MC965 MacBook Air”

mt = “Apple MacBook Air MC965”

hs = “12800000”

Case “Apple MC966 MacBook Air”

mt = “Apple MacBook Air MC966”

hs = “15800000”

Case “Apple MC968 MacBook Air”

mt = “Apple MacBook Air MC968”

hs = “9900000”

Case “Apple MC969 MacBook Air”

mt = “Apple MacBook Air MC969”

hs = “11900000”

Case “Apple MC700 MacBook Pro”

mt = “Apple MacBook Pro MC700”

hs = “10800000”

Case “Apple MC721 MacBook Pro”

mt = “Apple MacBook Pro MC721”

hs = “15900000”

Case “Apple MC723 MacBook Pro”

mt = “Apple MacBook Pro MC723”

hs = “19300000”

Case “Apple MC724 MacBook Pro”

mt = “Apple MacBook Pro MC724”

hs = “13700000”

Case “Apple MC311 MacBook Pro”

mt = “Apple MacBook Pro MC311”

hs = “24200000”

Case “Apple MC313 MacBook Pro”

mt = “Apple MacBook Pro MC313”

hs = “11900000”

Case “Apple MC314 MacBook Pro”

mt = “Apple MacBook Pro MC314”

hs = “14700000”

Case “Apple MC318 MacBook Pro”

mt = “Apple MacBook Pro MC318”

hs = “17600000”

Case “Apple MC322 MacBook Pro”

mt = “Apple MacBook Pro MC322”

hs = “21300000”

Case “Apple MC965 MacBook Air”

mt = “Apple MacBook Air MC965”

hs = “12800000”

Case “Apple MC966 MacBook Air”

mt = “Apple MacBook Air MC966”

hs = “15800000”

End Select

txtmerk.Text = mt

txtharga.Text = hs

txtjumlah.SetFocus

End Sub

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

cbokode.SetFocus

cbokode.Text = “”

txtmerk.Text = “”

txtharga.Text = “”

txtjumlah.Text = “”

txtharpen.Text = “”

txtdiskon.Text = “”

txttotal.Text = “”

End Sub

 

Private Sub cmdproses_Click()

txtharpen.Text = Val(txtharga) * Val(txtjumlah)

Select Case txtharpen.Text

Case Is > 140000000

txtdiskon.Text = Val(txtharpen) * 0.15

Case Is > 135000000

txtdiskon.Text = Val(txtharpen) * 0.1

Case Is > 130000000

txtdiskon.Text = Val(txtharpen) * 0.05

Case Is > 125000000

txtdiskon.Text = Val(txtharpen) * 0.02

End Select

txttotal.Text = Val(txtharpen) – Val(txtdiskon)

End Sub

 

Private Sub Form_Load()

cbokode.AddItem “Apple MC965 MacBook Air”

cbokode.AddItem “Apple MC966 MacBook Air”

cbokode.AddItem “Apple MC968 MacBook Air”

cbokode.AddItem “Apple MC969 MacBook Air”

cbokode.AddItem “Apple MC700 MacBook Pro”

cbokode.AddItem “Apple MC721 MacBook Pro”

cbokode.AddItem “Apple MC723 MacBook Pro”

cbokode.AddItem “Apple MC724 MacBook Pro”

cbokode.AddItem “Apple MC311 MacBook Pro”

cbokode.AddItem “Apple MC313 MacBook Pro”

cbokode.AddItem “Apple MC314 MacBook Pro”

cbokode.AddItem “Apple MC318 MacBook Pro”

cbokode.AddItem “Apple MC322 MacBook Pro”

cbokode.AddItem “Apple MC965 MacBook Air”

cbokode.AddItem “Apple MC966 MacBook Air”

End Sub

 

 

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s