SYNTAX VB kode barang

5. kode barang

Syntax :
Private Sub Command1_Click()
Label4.Visible = True
Label3.Visible = True
Combo1.Visible = True
Text3.Visible = True
Command2.Visible = True
List1.Visible = True
End Sub

Private Sub Command2_Click()
List1.Clear
List1.AddItem "Kode Barang = " & Combo1.Text
List1.AddItem "Kuantitas       = " & Text3.Text
If Combo1.Text = "101" Then
j = 1500 * Text3.Text
List1.AddItem "                      ______+"
List1.AddItem "Total              = " & j
End If
If Combo1.Text = "102" Then
j = 2050 * Text3.Text
List1.AddItem "                      ______+"
List1.AddItem "Total              = " & j
End If
If Combo1.Text = "103" Then
j = 4750 * Text3.Text
List1.AddItem "                      ______+"
List1.AddItem "Total              = " & j
End If
If Combo1.Text = "104" Then
j = 2500 * Text3.Text
List1.AddItem "                      ______+"
List1.AddItem "Total              = " & j
End If
If Combo1.Text = "105" Then
j = 3550 * Text3.Text
List1.AddItem "                      ______+"
List1.AddItem "Total              = " & j
End If
If Combo1.Text = "106" Then
j = 1750 * Text3.Text
List1.AddItem "                      ______+"
List1.AddItem "Total              = " & j
End If
End Sub

Private Sub Form_Load()
Label4.Visible = False
Label3.Visible = False
Combo1.Visible = False
Text3.Visible = False
Command2.Visible = False
List1.Visible = False
Combo1.AddItem "101"
Combo1.AddItem "102"
Combo1.AddItem "103"
Combo1.AddItem "104"
Combo1.AddItem "105"
Combo1.AddItem "106"
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeyBack Then
Else
    KeyAscii = 0
End If
End Sub

Ashita setyoning rinanti 1012503189

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 komentar:

Posting Komentar