Buat tampilan pada form seperti berikut:
Masukkan source code Berikut
Private Sub Combo1_Click()
If Combo1.Text = "HP" Then
Text1.Text = "300000"
ElseIf Combo1.Text = "Casing Hp" Then
Text1.Text = "20000"
ElseIf Combo1.Text = "Asesoris Hp" Then
Text1.Text = "10000"
ElseIf Combo1.Text = "Voucer Hp" Then
Text1.Text = "12000"
End If
End Sub
Private Sub Command1_Click()
On Error GoTo er
Dim jawab As String
Dim a As Integer
a = Text3.Text
'If Text3.Text = "" Then
'MsgBox "Jumlah Beli harus diisi!", vbInformation, "Farul Info"
If (a < "6") Then
Label8.Caption = "Maaf Kamu Tidak Dapat Diskon"
Text2.Text = Text1.Text * Text3.Text
Text4.Text = "0"
Text5.Text = Text2.Text - Text4.Text
jawab = MsgBox("Ada transaksi Lain?", vbYesNo, "Farul Info")
If jawab = vbYes Then
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Else
End
End If
Else
Label8.Caption = "Selamat ya, Kamu Dapat Diskon"
Text2.Text = Text1.Text * Text3.Text
Text4.Text = Text2.Text * 0.1
Text5.Text = Text2.Text - Text4.Text
jawab = MsgBox("Ada transaksi Lain?", vbYesNo, "Farul Info")
If jawab = vbYes Then
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Else
End
End If
End If
er:
MsgBox "Harus diisi om"
End Sub
Private Sub Form_Load()
Combo1.AddItem "HP"
Combo1.AddItem "Casing Hp"
Combo1.AddItem "Asesoris Hp"
Combo1.AddItem "Voucer Hp"
End Sub
Untuk download aplikasinya klik DOWNLOADsalam sepuluh Ribu jam untuk Expert.... ^_^

No comments :
Post a Comment