Private Sub cmdlagi_Click()

cbokk.SetFocus

cbokk.Text = “”

txtjk.Text = “”

txths.Text = “”

txtjj.Text = “”

txthp.Text = “”

txtdiscount.Text = “”

txthb.Text = “”

End Sub

 

Private Sub cmdproses_Click()

txthp = Val(txtjj.Text) * Val(txths.Text)

If txthp.Text > 30000000 Then

txtdiscount.Text = Val(txthp.Text) * 0.15

ElseIf txthp.Text > 25000000 Then

txtdiscount.Text = Val(txthp.Text) * 0.1

ElseIf txthp.Text > 20000000 Then

txtdiscount.Text = Val(txthp.Text) * 0.05

ElseIf txthp.Text > 15000000 Then

txtdiscount.Text = Val(txthp.Text) * 0.02

End If

txthb.Text = Val(txthp.Text) – Val(txtdiscount.Text)

 

End Sub

 

Private Sub Cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub form_load()

cbokk.AddItem “p205”

cbokk.AddItem “p308”

cbokk.AddItem “p310”

cbokk.AddItem “p415”

cbokk.AddItem “p417”

cbokk.AddItem “p419”

End Sub

Private Sub CBOKK_click()

Dim JK As String

Dim HS As Currency

Select Case cbokk.Text

Case “p205”

JK = “pentium II 500 Mega Hz”

HS = “1500000”

Case “p308”

JK = “pentium III 800 Mega Hz”

HS = “2100000”

Case “p310”

JK = “pentium III 1.0 Giga Hz”

HS = “3500000”

Case “p415”

JK = “pentium IV 1.5 Giga Hz”

HS = “4000000”

Case “p417”

JK = “pentium IV 1.7 Giga Hz”

HS = “4200000”

Case “p419”

JK = “pentium IV 1.9 Giga Hz”

HS = “5500000”

End Select

txtjk.Text = JK

txths.Text = HS

txtjk.SetFocus

End Sub