Senin, 11 April 2011

PERHITUNGAN BIAYA FOTO COPY MENGGUNAKAN VB

Private Sub Command1_Click()
Text1.Text = Clear
Text2.Text = Clear
Text3.Text = Clear
Text4.Text = Clear
Text5.Text = Clear
Text6.Text = Clear
End Sub

Private Sub Command2_Click()
Text3.Text = Text1.Text * Text2.Text


If Text3.Text <= 20000 Then
Text4.Text = 0
End If
If Text3.Text <= 40000 Then
Text4.Text = 0.02 * Text3.Text
End If
If Text3.Text <= 60000 Then
Text4.Text = 0.05 * Text3.Text
End If
If Text3.Text <= 80000 Then
Text4.Text = 0.07 * Text3.Text
End If
If Text3.Text > 80000 Then
Text4.Text = 0.1 * Text3.Text
End If
Text5.Text = Text3.Text - Text4.Text


If Text5.Text <= 50000 Then
Text6.Text = "non bonus"
Else
If Text5.Text <= 70000 Then
Text6.Text = "buku"
Else
If Text5.Text <= 90000 Then
Text6.Text = "majalah"
Else
If Text5.Text > 90000 Then
Text6.Text = "buku dan majalah"
End If
End If
End If
End If
End Sub

Private Sub Command3_Click()
End
End Sub

Tidak ada komentar:

Posting Komentar