Coding File Inventory
Coding File Inventory
Coding File Inventory
Hapusdata1.Offset(0, 0).ClearContents
Hapusdata1.Offset(0, 1).ClearContents
Hapusdata1.Offset(0, 2).ClearContents
Hapusdata1.Offset(0, 3).ClearContents
Hapusdata1.Offset(0, 4).ClearContents
Hapusdata1.Offset(0, 5).ClearContents
Hapusdata1.Offset(0, 6).ClearContents
Hapusdata2.Offset(0, 0).ClearContents
Hapusdata2.Offset(0, 1).ClearContents
Hapusdata2.Offset(0, 2).ClearContents
End Sub
Cells(BARIS, 1) = Me.TXTID.Value
Cells(BARIS, 2) = Me.TXTNAMA.Value
Cells(BARIS, 3) = Me.CBSATUAN.Value
Cells(BARIS, 4) = Me.TXTCOST.Value
Cells(BARIS, 5) = Me.TXTPRICE.Value
Cells(BARIS, 6) = Me.TXTLACI.Value
Cells(BARIS, 7) = Me.TXTORDER.Value
End Sub
End Sub
End Sub
Me.TXTIDBARANG.Value = Me.TABELDATA.Value
Me.TXTNAMA.Value = CariBarang.Offset(0, 1).Value
Me.TXTSATUAN.Value = CariBarang.Offset(0, 2).Value
Me.TXTCOST.Value = CariBarang.Offset(0, 3).Value
Me.TXTPRICE.Value = CariBarang.Offset(0, 4).Value
Me.TXTNOMORLACI.Value = CariBarang.Offset(0, 5).Value
Me.TXTIDBARANG.Enabled = False
Me.TXTNAMA.Enabled = False
Me.TXTSATUAN.Enabled = False
Me.TXTCOST.Enabled = False
Me.TXTPRICE.Enabled = False
Me.TXTNOMORLACI.Enabled = False
Me.TXTTOTALCOST.Enabled = False
Me.TXTTOTALPRICE.Enabled = False
Exit Sub
EXCELVBA:
Call MsgBox("Maaf, data barang belum terdaftar", vbInformation, "Data Barang")
End Sub
End Sub
End Sub
End Sub
Sub Cari_Order()
On Error GoTo Salah
Dim iRow As Long
Set Cari_Data = Sheet5
Cari_Data.Range("A5").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _
Sheet6.Range("N1:N2"), CopyToRange:=Sheet6.Range("A1:L1"), Unique:=False
Exit Sub
Salah:
Call MsgBox("Maaf Data tidak ditemukan", vbInformation, "Cari Data")
End Sub
MODUL MENU
Sub BukaFormBarang()
FORMTABELBARANG.Show
End Sub
Sub BukaINOUT()
FORMINOUT.Show
End Sub
Sub BukaInventory()
FORMINVENTORY.Show
End Sub
Sub BukaOrder()
Call Cari_Order
DETAILORDER.Show
End Sub
Sub SimpanFile()
ThisWorkbook.Save
End Sub
Sub Keluar()
Select Case MsgBox("Anda akan menghapus data" _
& vbCrLf & "Apakah anda yakin?" _
, vbYesNo Or vbQuestion Or vbDefaultButton1, "Hapus data")
Case vbNo
Exit Sub
Case vbYes
End Select
ThisWorkbook.Save
ThisWorkbook.close
End Sub