Private Sub cb_nama_barang_Change()
Dim index As Integer
Worksheets("REKAP").Activate
Cells(cb_nama_barang.ListIndex + 6, 3).Select
tb_Kode = ActiveCell.Value
Cells(cb_nama_barang.ListIndex + 6, 5).Select
tb_unit = ActiveCell.Value
Cells(cb_nama_barang.ListIndex + 6, 11).Select
text_stock = ActiveCell.Value
Worksheets("OUT").Activate
End Sub
Private Sub cb_user_Change()
Dim index As Integer
Worksheets("USER").Activate
Cells(cb_user.ListIndex + 2, 2).Select
TextBox1 = ActiveCell.Value
Cells(cb_user.ListIndex + 2, 3).Select
TextBox2 = ActiveCell.Value
Cells(cb_user.ListIndex + 2, 4).Select
TextBox3 = ActiveCell.Value
Worksheets("OUT").Activate
End Sub
Private Sub cmd_db_Click()
Unload Me
Worksheets("OUT").Activate
End Sub
Private Sub cmd_tambah_Click()
Dim Wury As Long
Wury = WorksheetFunction.CountA(Range("B:B")) + 4
Cells(Wury, 2).Select
Cells(Wury, 2).Value = tb_Kode.Value
Cells(Wury, 3).Value = cb_nama_barang.Value
Cells(Wury, 4).Value = tb_unit.Value
Cells(Wury, 15).Value = tb_tgl_terima.Value
Cells(Wury, 6).Value = tb_jumlah.Value
Cells(Wury, 7).Value = TextBox2.Value
Cells(Wury, 8).Value = TextBox1.Value
Cells(Wury, 9).Value = TextBox3.Value
Call bersih
cb_nama_barang.SetFocus
End Sub
Private Sub SpinNilai_Change()
tb_jumlah.Value = SpinNilai
End Sub
Sub bersih()
tb_Kode.Value = ""
cb_nama_barang.Value = ""
tb_unit.Value = ""
End Sub
Private Sub tb_jumlah_Change()
On Error GoTo A
tb_jumlah = Format(tb_jumlah * 1, "#,##0")
Exit Sub
A: tb_jumlah = ""
End Sub
Tidak ada komentar:
Posting Komentar