Liat dulu nihh tampilannya,,,
nihhh baru koding nya,,,
Private Sub Form_Load()
xNO.Enabled = False
xMETERLALU.Enabled = False
xMETERSEKARANG.Enabled = False
xPAKAI.Enabled = False
xBAYAR.Enabled = False
End Sub
Private Sub INPUT_Click()
xNO.Enabled = True
xMETERLALU.Enabled = True
xMETERSEKARANG.Enabled = True
xPAKAI.Enabled = True
xBAYAR.Enabled = True
xNO.Text = ""
xMETERLALU.Text = ""
xMETERSEKARANG.Text = ""
xNO.SetFocus
xNO.BackColor = vbWhite
xMETERLALU.BackColor = vbWhite
xMETERSEKARANG.BackColor = vbWhite
xPAKAI.BackColor = vbWhite
xBAYAR.BackColor = vbWhite
End Sub
Private Sub xMETERSEKARANG_LostFocus()
xPAKAI.Text = Val(xMETERSEKARANG.Text) - Val(xMETERLALU.Text)
End Sub
Private Sub xPAKAI_LostFocus()
If Val(xPAKAI.Text) <= 10 Then
tarif1 = 5000 * Val(xPAKAI.Text)
tarif2 = 0
tarif3 = 0
End If
If (Val(xPAKAI.Text) > 10) And (Val(xPAKAI.Text) <= 20) Then
tarif1 = 5000 * Val(10)
tarif2 = 10000 * (Val(xPAKAI.Text) - 10)
tarif3 = 0
End If
If Val(xPAKAI.Text) > 20 Then
tarif1 = 5000 * Val(10)
tarif2 = 10000 * Val(10)
tarif3 = 15000 * (Val(xPAKAI.Text) - 20)
End If
xBAYAR.Text = tarif1 + tarif2 + tarif3
End Sub
Private Sub KELUAR_Click()
End
End Sub
2 komentar:
Hi there, just became alert to your blog through Google, and found that it's really informative. I'm gonna watch out for brussels.
I'll appreciate if you continue this in future. A lot of people will be benefited from your writing. Cheers!
Also visit my homepage :: Weight Loss
I almost never create responses, but i did some searching and wound up
here "Pembayaran PDAM dengan Visual Basic".
And I do have a few questions for you if you tend not to mind.
Is it just me or does it look as if like some of the comments
look like they are written by brain dead folks? :-P And, if you are
writing at additional social sites, I would like
to keep up with anything new you have to post. Would you make a
list of every one of all your communal sites like your linkedin
profile, Facebook page or twitter feed?
Here is my web blog; Slim Lipo
Posting Komentar