vb1/nirwana cell

nirwana cellvb1

LISTING :

Private Sub cmdbaru_Click()
np5.Value = False
np10.Value = False
np20.Value = False
np50.Value = False
t5.Text = “”
t10.Text = “”
t20.Text = “”
t50.Text = “”
ttohar.Text = “”
tppn.Text = “”
ttobay.Text = “”
End Sub

Private Sub cmdhitung_Click()
ttohar.Text = Val(t5.Text) + Val(t10.Text) + Val(t20.Text) + Val(t50.Text)
tppn.Text = 0.01 * Val(ttohar.Text)
ttobay.Text = Val(ttohar.Text) + Val(tppn.Text)
End Sub

Private Sub cmdkeluar_Click()
p = MsgBox(“yakin ingin keluar mas?”, vbQuestion + vbOKCancel, “INFO”)
If p = vbOK Then
Unload Me
End If
End Sub

Private Sub Form_Load()

End Sub

Private Sub np10_Click()
If np10 = Checked Then
If lkode.Text = “SIMPATI” Then
t10.Text = 11500
ElseIf lkode.Text = “AS” Then
t10.Text = 11500
ElseIf lkode.Text = “MENTARI” Then
t10.Text = 10500
ElseIf lkode.Text = “IM3” Then
t10.Text = 10500
ElseIf lkode.Text = “XL” Then
t10.Text = 11000
ElseIf lkode.Text = “ESIA” Then
t10.Text = 10500
Else
t10.Text = 10500
End If
Else: t10.Text = 0
End If
End Sub

Private Sub np20_Click()
If np20 = Checked Then
If lkode.Text = “SIMPATI” Then
t20.Text = 22000
ElseIf lkode.Text = “AS” Then
t20.Text = 22000
ElseIf lkode.Text = “MENTARI” Then
t20.Text = 21000
ElseIf lkode.Text = “IM3” Then
t20.Text = 21000
ElseIf lkode.Text = “XL” Then
t20.Text = 21000
ElseIf lkode.Text = “ESIA” Then
t20.Text = 21000
Else
t20.Text = 20500
End If
Else: t20.Text = 0
End If
End Sub

Private Sub np5_Click()
If np5 = Checked Then
If lkode.Text = “SIMPATI” Then
t5.Text = 6500
ElseIf lkode.Text = “AS” Then
t5.Text = 6500
ElseIf lkode.Text = “MENTARI” Then
t5.Text = 6000
ElseIf lkode.Text = “IM3” Then
t5.Text = 6000
ElseIf lkode.Text = “XL” Then
t5.Text = 6000
ElseIf lkode.Text = “ESIA” Then
t5.Text = 6000
Else
t5.Text = 6000
End If
Else: t5.Text = 0
End If
End Sub


Private Sub np50_Click()
If np50 = Checked Then
If lkode.Text = “SIMPATI” Then
t50.Text = 52000
ElseIf lkode.Text = “AS” Then
t50.Text = 52000
ElseIf lkode.Text = “MENTARI” Then
t50.Text = 51000
ElseIf lkode.Text = “IM3” Then
t50.Text = 51000
ElseIf lkode.Text = “XL” Then
t50.Text = 50500
ElseIf lkode.Text = “ESIA” Then
t50.Text = 50500
Else
t50.Text = 50500
End If
Else: t50.Text = 0
End If
End Sub


Private Sub Timer1_Timer()
ttgl.Text = Date
tjam.Text = Time
End Sub

setelah di running HASIL’a :

ketentuan :

1. tombol baru di klik maka semua form bersih.

2. tombol keluar dengan message.

3. pilih operator seluller maka harga tampil sesuai operator.

****BRAVO****

Leave a comment