tugas 5

IMG_20160103_215240

Private Sub Cmdlagi_Click()

Cbokd.SetFocus

Cbokd.Text = “”

Txtjns.Text = “”

Txths.Text = “”

Txtjj.Text = “”

Txthp.Text = “”

Txtdc.Text = “”

Txthb.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Txthp.Text = Val(Txths * Txtjj)

Dim diskon As String

Select Case Txthp.Text

Case Is > 30000000

diskon = Val(Txthp * 0.15)

Case Is > 25000000

diskon = Val(Txthp * 0.1)

Case Is > 20000000

diskon = Val(Txthp * 0.05)

Case Is > 15000000

diskon = Val(Txthp * 0.02)

End Select

Txtdc.Text = diskon

Txthb.Text = Val(Txthp – Txtdc)

End Sub

 

Private Sub Cbokd_Click()

Dim J As String

J = Mid(Cbokd.Text, 1, 4)

If J = “P205” Then

Txtjns.Text = “Pentium II   500 Mega HZ”

Txths.Text = “1500000”

ElseIf J = “P308” Then

Txtjns.Text = “Pentium III   800 Mega HZ”

Txths.Text = “2100000”

ElseIf J = “P310” Then

Txtjns.Text = “Pentium III   1.0 Giga HZ”

Txths.Text = “3500000”

ElseIf J = “P415” Then

Txtjns.Text = “Pentium IV   1.5 Giga HZ”

Txths.Text = “4000000”

ElseIf J = “P417” Then

Txtjns.Text = “Pentium IV   1.7 Giga HZ”

Txths.Text = “4200000”

ElseIf J = “P419” Then

Txtjns.Text = “Pentium III   1.9 Giga HZ”

Txths.Text = “5500000”

End If

Txtjj.SetFocus

End Sub

 

Private Sub Comdclose_Click()

End

End Sub

 

Private Sub Form_Load()

Cbokd.AddItem “P205”

Cbokd.AddItem “P308”

Cbokd.AddItem “P310”

Cbokd.AddItem “P415”

Cbokd.AddItem “P417”

Cbokd.AddItem “P419”

End Sub

Standard

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