the cheapest car insurance cost of car insurance best car insurance quotes insurance auto insurance quotes car get car insurance quotes online car insurance agent instant car insurance quote car insurance websites direct car insurance insure a car motor car insurance quote cheap car insurance online quotes for car insurance car insurers commercial car insurance motor insurance quote car insurance quotes online get a quote online international health insurance compare car insurance quotes insurance for car compare car insurance car insurance buy life insurance online compare auto insurance international medical insurance general car insurance cheap motor insurance low car insurance car insurance comparison company car insurance budget car insurance private health insurance online quote car insurance cheap motor car insurance car insurance for new drivers cheap car insurance quotes online online car insurance quotes get car insurance quotes car insurance quotes comparison motor car insurance car insurance quotes car insurance cheap comprehensive car insurance best auto insurance short term health insurance motor insurance cheap online car insurance online motor insurance quotes car insurance california buycarinsurance online vehicle insurance free car insurance quotes landlord insurance health insurance for children motorbike insurance monthly car insurance car insurance usa car insurance reviews car insurance renewal quotes vehicle insurance health insurance rates term life insurance quotes vehicle insurance quotes car insurance compare motor vehicle insurance best car insurance motor insurance online quote car insurance online quote life insurance online supplemental health insurance best car insurance rates car insurance discounts motor vehicle insurance quotes auto insurance cheap travel insurance bike insurance travel medical insurance buy car insurance online online motor insurance travel insurance quote get a quote for car insurance health insurance agent car insurance companies cheap car insurance companies travel insurance annual travel insurance commercial vehicle insurance permanent life insurance medical insurance quotes online car insurance cheap car insurance quotes car insurance online quote insurance online level term life insurance health insurance comparison how much is car insurance travel health insurance pet health insurance quotes on cars health ins travel insurance uk quote for car insurance get insurance quote online disability insurance quote temporary health insurance temporary insurance rental car insurance cheap health insurance auto insurance compare third party car insurance buy health insurance auto insurance quotes cheap insurance companies best term life insurance personal health insurance online quote insurance car insurance premium health insurance policies quotes for cars whole life insurance credit insurance cheap van insurance cheap term life insurance cheap motorcycle insurance compare life insurance car insurance cover health insurance motorcycle insurance short term car insurance health insurance coverage insurance qoute cheap life insurance house insurance quote car insurance uk health insurance companies cigna health insurance cheap insurance cheap car insurance uk compare health insurance car insurance for young drivers short term insurance online health insurance caravan insurance life insurance comparison direct insurance health insurance plans motor insurance online car insurance estimator accident insurance home insurance quotes nj car insurance new car insurance private medical insurance home insurance car insurance brokers car insurance rates commercial insurance health insurance quotes motor insurance companies which car insurance car quotes online online auto insurance flood insurance cheap auto insurance quotes car insurance agencies business health insurance term life insurance truck insurance professional indemnity insurance life insurance car insurance policy long term care insurance drive insurance buy insurance car ins motorcycle insurance quote critical illness insurance term insurance student health insurance home insurance comparison insurance rates insurance cover holiday insurance insurance sites online vehicle insurance quotes company website home insurance rates compare insurance buy insurance online affordable medical insurance car insurance coverage product liability insurance home contents insurance buy life insurance renters insurance group health insurance family health insurance motor insurance quote online mortgage insurance best home insurance personal insurance medical insurance property insurance life insurance agent group insurance aetna health insurance cheap medical insurance liability insurance rental insurance life insurance policy group life insurance general liability insurance insurance quotes online all car insurance companies best health insurance insurance plans life insurance for seniors van insurance website quote universal life insurance building insurance co insurance insurance car car insurance prices disability insurance insurance vehicle cheap vehicle insurance senior life insurance medical insurance plans insurance health house insurance life insurance quotes car quotes cheap home insurance business insurance com bank credit card lowest credit card eligibility no fee credit cards best credit card compare how can i apply for credit card business credit cards cheapest credit card company credit card corporate credit card apply for a credit card online 0 apr credit cards how can i get credit card get a credit card open credit card usa credit card instant credit card approval store credit cards credit card shopping airline miles credit card frequent flyer credit cards hotel credit cards best credit card deals compare credit miles credit card credit card consolidation college student credit cards how do i apply for a credit card gold credit card how to open credit card apply for credit card eligibility for credit card credit card verification credit card offers online credit card application form which credit card to apply how can i get a credit card credit card online apply credit cards uk 0 credit cards looking for credit card offers credit card information bank credit card application travel credit cards what is a credit card credit card sign up master credit card cash back cards platinum credit card compare visa cards credit bank credit card no interest credit cards cheap credit cards 0 credit card offers online credit new credit cards application of credit card how to apply for credit card apply card credit online credit card deals premier credit card mastercard credit card how to get credit card apply credit card credit card application credit companies creditcard cash back credit cards airline credit cards cash credit card credit card rates student credit cards apply credit card online how to apply credit card interest free credit card secured credit card best travel credit card capital one credit card online credit card application credit cards with no annual fee new credit card offers apply online credit card credit card apply online best rewards credit card city credit card how to get a credit card credit card counseling rebate credit card mastercard debit card credit card debt best credit cards to apply for best credit cards apply for credit card online credit card apply how to apply for a credit card apply for new credit card credit card rebate best credit card comparison apply for visa card online cim credit card good credit cards credit card cash back best cash back credit cards mastercard credit card application credit card checker credit card mastercard instant credit card card compare credit card rewards programs compare the best credit cards apply visa card cash rebate credit card bankruptcy credit cards card offers instant approval credit cards credit card online application credit cards for students how to sign up for credit card uk credit cards credit card account about credit card visa card apply online credit card compare site secured mastercard visa card application credit card rewards credit rating how can we get credit card visa credit card rewards card online credit card processing capital credit card credit card visa consolidate credit cards credit card processing credit card reviews apply new credit card business credit card application credit cards with cash back credit card reader credit card instant approval online apply credit card bad credit credit cards credit card selection online visa card pay with credit card credit card charges visa or mastercard credit card machine apply a credit card small business credit cards prepaid debit cards visa debit card mbna credit card credit card terminal card credit application credit card generator credit card balance credit card numbers credit card transfer credit card interest rates credit card interest gold card credit card online best rate credit cards credit card low interest visa card online online credit card how to apply a credit card 0 interest credit cards debit card the cheapest car insurance cost of car insurance best car insurance quotes insurance auto insurance quotes car get car insurance quotes online car insurance agent instant car insurance quote car insurance websites direct car insurance insure a car motor car insurance quote cheap car insurance online quotes for car insurance car insurers commercial car insurance motor insurance quote car insurance quotes online get a quote online international health insurance compare car insurance quotes insurance for car compare car insurance car insurance buy life insurance online compare auto insurance international medical insurance general car insurance cheap motor insurance low car insurance car insurance comparison company car insurance budget car insurance private health insurance online quote car insurance cheap motor car insurance car insurance for new drivers cheap car insurance quotes online online car insurance quotes get car insurance quotes car insurance quotes comparison motor car insurance car insurance quotes car insurance cheap comprehensive car insurance best auto insurance short term health insurance motor insurance cheap online car insurance online motor insurance quotes car insurance california buycarinsurance online vehicle insurance free car insurance quotes landlord insurance health insurance for children motorbike insurance monthly car insurance car insurance usa car insurance reviews car insurance renewal quotes vehicle insurance health insurance rates term life insurance quotes vehicle insurance quotes car insurance compare motor vehicle insurance best car insurance motor insurance online quote car insurance online quote life insurance online supplemental health insurance best car insurance rates car insurance discounts motor vehicle insurance quotes auto insurance cheap travel insurance bike insurance travel medical insurance buy car insurance online online motor insurance travel insurance quote get a quote for car insurance health insurance agent car insurance companies cheap car insurance companies travel insurance annual travel insurance commercial vehicle insurance permanent life insurance medical insurance quotes online car insurance cheap car insurance quotes car insurance online quote insurance online level term life insurance health insurance comparison how much is car insurance travel health insurance pet health insurance quotes on cars health ins travel insurance uk quote for car insurance get insurance quote online disability insurance quote temporary health insurance temporary insurance rental car insurance cheap health insurance auto insurance compare third party car insurance buy health insurance auto insurance quotes cheap insurance companies best term life insurance personal health insurance online quote insurance car insurance premium health insurance policies quotes for cars whole life insurance credit insurance cheap van insurance cheap term life insurance cheap motorcycle insurance compare life insurance car insurance cover health insurance motorcycle insurance short term car insurance health insurance coverage insurance qoute cheap life insurance house insurance quote car insurance uk health insurance companies cigna health insurance cheap insurance cheap car insurance uk compare health insurance car insurance for young drivers short term insurance online health insurance caravan insurance life insurance comparison direct insurance health insurance plans motor insurance online car insurance estimator accident insurance home insurance quotes nj car insurance new car insurance private medical insurance home insurance car insurance brokers car insurance rates commercial insurance health insurance quotes motor insurance companies which car insurance car quotes online online auto insurance flood insurance cheap auto insurance quotes car insurance agencies business health insurance term life insurance truck insurance professional indemnity insurance life insurance car insurance policy long term care insurance drive insurance buy insurance car ins motorcycle insurance quote critical illness insurance term insurance student health insurance home insurance comparison insurance rates insurance cover holiday insurance insurance sites online vehicle insurance quotes company website home insurance rates compare insurance buy insurance online affordable medical insurance car insurance coverage product liability insurance home contents insurance buy life insurance renters insurance group health insurance family health insurance motor insurance quote online mortgage insurance best home insurance personal insurance medical insurance property insurance life insurance agent group insurance aetna health insurance cheap medical insurance liability insurance rental insurance life insurance policy group life insurance general liability insurance insurance quotes online all car insurance companies best health insurance insurance plans life insurance for seniors van insurance website quote universal life insurance building insurance co insurance insurance car car insurance prices disability insurance insurance vehicle cheap vehicle insurance senior life insurance medical insurance plans insurance health house insurance life insurance quotes car quotes cheap home insurance business insurance com bank credit card lowest credit card eligibility no fee credit cards best credit card compare how can i apply for credit card business credit cards cheapest credit card company credit card corporate credit card apply for a credit card online 0 apr credit cards how can i get credit card get a credit card open credit card usa credit card instant credit card approval store credit cards credit card shopping airline miles credit card frequent flyer credit cards hotel credit cards best credit card deals compare credit miles credit card credit card consolidation college student credit cards how do i apply for a credit card gold credit card how to open credit card apply for credit card eligibility for credit card credit card verification credit card offers online credit card application form which credit card to apply how can i get a credit card credit card online apply credit cards uk 0 credit cards looking for credit card offers credit card information bank credit card application travel credit cards what is a credit card credit card sign up master credit card cash back cards platinum credit card compare visa cards credit bank credit card no interest credit cards cheap credit cards 0 credit card offers online credit new credit cards application of credit card how to apply for credit card apply card credit online credit card deals premier credit card mastercard credit card how to get credit card apply credit card credit card application credit companies creditcard cash back credit cards airline credit cards cash credit card credit card rates student credit cards apply credit card online how to apply credit card interest free credit card secured credit card best travel credit card capital one credit card online credit card application credit cards with no annual fee new credit card offers apply online credit card credit card apply online best rewards credit card city credit card how to get a credit card credit card counseling rebate credit card mastercard debit card credit card debt best credit cards to apply for best credit cards apply for credit card online credit card apply how to apply for a credit card apply for new credit card credit card rebate best credit card comparison apply for visa card online cim credit card good credit cards credit card cash back best cash back credit cards mastercard credit card application credit card checker credit card mastercard instant credit card card compare credit card rewards programs compare the best credit cards apply visa card cash rebate credit card bankruptcy credit cards card offers instant approval credit cards credit card online application credit cards for students how to sign up for credit card uk credit cards credit card account about credit card visa card apply online credit card compare site secured mastercard visa card application credit card rewards credit rating how can we get credit card visa credit card rewards card online credit card processing capital credit card credit card visa consolidate credit cards credit card processing credit card reviews apply new credit card business credit card application credit cards with cash back credit card reader credit card instant approval online apply credit card bad credit credit cards credit card selection online visa card pay with credit card credit card charges visa or mastercard credit card machine apply a credit card small business credit cards prepaid debit cards visa debit card mbna credit card credit card terminal card credit application credit card generator credit card balance credit card numbers credit card transfer credit card interest rates credit card interest gold card credit card online best rate credit cards credit card low interest visa card online online credit card how to apply a credit card 0 interest credit cards debit card the cheapest car insurance cost of car insurance best car insurance quotes insurance auto insurance quotes car get car insurance quotes online car insurance agent instant car insurance quote car insurance websites direct car insurance insure a car motor car insurance quote cheap car insurance online quotes for car insurance car insurers commercial car insurance motor insurance quote car insurance quotes online get a quote online international health insurance compare car insurance quotes insurance for car compare car insurance car insurance buy life insurance online compare auto insurance international medical insurance general car insurance cheap motor insurance low car insurance car insurance comparison company car insurance budget car insurance private health insurance online quote car insurance cheap motor car insurance car insurance for new drivers cheap car insurance quotes online online car insurance quotes get car insurance quotes car insurance quotes comparison motor car insurance car insurance quotes car insurance cheap comprehensive car insurance best auto insurance short term health insurance motor insurance cheap online car insurance online motor insurance quotes car insurance california buycarinsurance online vehicle insurance free car insurance quotes landlord insurance health insurance for children motorbike insurance monthly car insurance car insurance usa car insurance reviews car insurance renewal quotes vehicle insurance health insurance rates term life insurance quotes vehicle insurance quotes car insurance compare motor vehicle insurance best car insurance motor insurance online quote car insurance online quote life insurance online supplemental health insurance best car insurance rates car insurance discounts motor vehicle insurance quotes auto insurance cheap travel insurance bike insurance travel medical insurance buy car insurance online online motor insurance travel insurance quote get a quote for car insurance health insurance agent car insurance companies cheap car insurance companies travel insurance annual travel insurance commercial vehicle insurance permanent life insurance medical insurance quotes online car insurance cheap car insurance quotes car insurance online quote insurance online level term life insurance health insurance comparison how much is car insurance travel health insurance pet health insurance quotes on cars health ins travel insurance uk quote for car insurance get insurance quote online disability insurance quote temporary health insurance temporary insurance rental car insurance cheap health insurance auto insurance compare third party car insurance buy health insurance auto insurance quotes cheap insurance companies best term life insurance personal health insurance online quote insurance car insurance premium health insurance policies quotes for cars whole life insurance credit insurance cheap van insurance cheap term life insurance cheap motorcycle insurance compare life insurance car insurance cover health insurance motorcycle insurance short term car insurance health insurance coverage insurance qoute cheap life insurance house insurance quote car insurance uk health insurance companies cigna health insurance cheap insurance cheap car insurance uk compare health insurance car insurance for young drivers short term insurance online health insurance caravan insurance life insurance comparison direct insurance health insurance plans motor insurance online car insurance estimator accident insurance home insurance quotes nj car insurance new car insurance private medical insurance home insurance car insurance brokers car insurance rates commercial insurance health insurance quotes motor insurance companies which car insurance car quotes online online auto insurance flood insurance cheap auto insurance quotes car insurance agencies business health insurance term life insurance truck insurance professional indemnity insurance life insurance car insurance policy long term care insurance drive insurance buy insurance car ins motorcycle insurance quote critical illness insurance term insurance student health insurance home insurance comparison insurance rates insurance cover holiday insurance insurance sites online vehicle insurance quotes company website home insurance rates compare insurance buy insurance online affordable medical insurance car insurance coverage product liability insurance home contents insurance buy life insurance renters insurance group health insurance family health insurance motor insurance quote online mortgage insurance best home insurance personal insurance medical insurance property insurance life insurance agent group insurance aetna health insurance cheap medical insurance liability insurance rental insurance life insurance policy group life insurance general liability insurance insurance quotes online all car insurance companies best health insurance insurance plans life insurance for seniors van insurance website quote universal life insurance building insurance co insurance insurance car car insurance prices disability insurance insurance vehicle cheap vehicle insurance senior life insurance medical insurance plans insurance health house insurance life insurance quotes car quotes cheap home insurance business insurance com bank credit card lowest credit card eligibility no fee credit cards best credit card compare how can i apply for credit card business credit cards cheapest credit card company credit card corporate credit card apply for a credit card online 0 apr credit cards how can i get credit card get a credit card open credit card usa credit card instant credit card approval store credit cards credit card shopping airline miles credit card frequent flyer credit cards hotel credit cards best credit card deals compare credit miles credit card credit card consolidation college student credit cards how do i apply for a credit card gold credit card how to open credit card apply for credit card eligibility for credit card credit card verification credit card offers online credit card application form which credit card to apply how can i get a credit card credit card online apply credit cards uk 0 credit cards looking for credit card offers credit card information bank credit card application travel credit cards what is a credit card credit card sign up master credit card cash back cards platinum credit card compare visa cards credit bank credit card no interest credit cards cheap credit cards 0 credit card offers online credit new credit cards application of credit card how to apply for credit card apply card credit online credit card deals premier credit card mastercard credit card how to get credit card apply credit card credit card application credit companies creditcard cash back credit cards airline credit cards cash credit card credit card rates student credit cards apply credit card online how to apply credit card interest free credit card secured credit card best travel credit card capital one credit card online credit card application credit cards with no annual fee new credit card offers apply online credit card credit card apply online best rewards credit card city credit card how to get a credit card credit card counseling rebate credit card mastercard debit card credit card debt best credit cards to apply for best credit cards apply for credit card online credit card apply how to apply for a credit card apply for new credit card credit card rebate best credit card comparison apply for visa card online cim credit card good credit cards credit card cash back best cash back credit cards mastercard credit card application credit card checker credit card mastercard instant credit card card compare credit card rewards programs compare the best credit cards apply visa card cash rebate credit card bankruptcy credit cards card offers instant approval credit cards credit card online application credit cards for students how to sign up for credit card uk credit cards credit card account about credit card visa card apply online credit card compare site secured mastercard visa card application credit card rewards credit rating how can we get credit card visa credit card rewards card online credit card processing capital credit card credit card visa consolidate credit cards credit card processing credit card reviews apply new credit card business credit card application credit cards with cash back credit card reader credit card instant approval online apply credit card bad credit credit cards credit card selection online visa card pay with credit card credit card charges visa or mastercard credit card machine apply a credit card small business credit cards prepaid debit cards visa debit card mbna credit card credit card terminal card credit application credit card generator credit card balance credit card numbers credit card transfer credit card interest rates credit card interest gold card credit card online best rate credit cards credit card low interest visa card online online credit card how to apply a credit card 0 interest credit cards debit card

3 Langkah Mudah Membuat Form Isi Barang Di Excel Menggunakan UserForm

Pada tulisan saya yang terdahulu tentang aplikasi persediaan barang terdiri dari beberapa worksheet yang dikombinasikan dengan form - form input untuk memudahkan pengguna mengisi ataupun menambahkan daftar barang. Form - form tersebut dibuat menggunakan user form yang ada pada VBA editor di Excel. Bagi Anda yang sudah mengenal dengan istilah user form pada VBA editor mungkin akan sangat mudah untuk membuatnya tapi bagaimana yang belum sama sekali ataupun baru mengenal istitilah ini.
Disini saya akan menjelaskan bagaimana cara membuat daftar isi barang tersebut menggunakan User Form pada VBA editor di Excel. 
Langkah-langkahnya adalah sebagai berikut: 

Langkah 1. Membuka Windows Project Explorer
- Tampilkan jendela VBA editor melalui menu Developer


- Tambahkan Form pada jendela VBA project melalui menu Insert lalu klik Usert Form


Maka akan muncul form yang nantinya akan kita design sesuai dengan apa yang kita inginkan. 


Untuk mendesign form tersebut agar sesuai dengan yang kita harapkan maka di perlukan tool-tool seperti Combo List, Combo Box, Text Box, Command Button, Dll. Semua tool tersebut telah disediakan didalam menu Toolbox seperti terlihat pada gambar dibawah ini ; 


Langkah 2. Mendesign Tampilan User Form
- Ubah Properties UserForm1 dengan kriteria Height : 295, Width : 490, seperti yang terlihat pada gambar dibawah ini; 


- Tambahkan 4 buah Frame pada UserForm1 yang tersedia pada menu Toolbox, dan atur tata letak sehingga terlihat seperti gambar dibawah ini. 


- Ubah Properties Caption untuk tiap-tiap frame, sepeti terlihat pada gambar dibawah ini;
Frame1 ubah ubah properties caption menjadi Data Barang. 


Frame2 ubah properties caption menjadi Jenis


Frame3 ubah properties caption menjadi Informasi Barang


Frame4 ubah properties caption menjadi "    " atau ( kosongkan saja )


Jika Anda telah melakukan seperti yang saya jelaskan di atas maka tampilan UserFrom1 menjadi terlihat seperti dibawah ini; 


Tambahkan tombol kontrol pada tiap-tiap frame dan atur tata letak sesuai dengan area yang tersedia pada tiap frame dengan contoh seperti gambar dibawah ini;


Lalu ubah properties caption pada masing-masing tombol kontrol seperti yang telah saya jelaskan diatas sehingga tampilan form menjadi terlihat seperti gambar dibawah ini;


Langkah 2. Menambahkan Kode Macro VB 

Agar form yang telah dibuat dapat berjalan secara otomatis dan dapat digunakan untuk kebutuhan menginput data barang maka perlu ditambahkan kode macro VB didalamnya.
Sebelum memasukkan kode VB maka terlebih dahulu ubah properties name pada masing-masing tombol kontrol seperti keterangan dibawah ini;

ComboBox1 = CBFilter 
TextBox1 = TBFilter
ListBox1 = LBFILTER
ComboBox2 = CBFILTERJENIS
TextBox1 = TBNama
TextBox2 = TBKode
TextBox3 = TBStok
TextBox4 = TBSatuan
CommandButton1 = CBOK
CommandButton2 = CBBatal
CommandButton3 = CBTambah
CommandButton4 = CBEdit
CommandButton5 = CBHapus
CommandButton5 = CMDTutup

- Lalu pada UserForm1 masukkan kode seperti dibawah ini;

Option Explicit
Dim CbLock As Boolean, Simpan As Boolean
Dim FormMode As String
Dim harga As Double
Const MsgboxTitle = "Daftar Barang"

'=================================================================================
' CCCCC
'=================================================================================
Private Sub CBTAMBAH_Click()
Dim JmlMasuk, JmlKeluar, JmlSisa
    CbLock = True
    Unlok
    TBKode.Value = Empty
    TBNama.Value = Empty
    TBStok.Value = Empty
    FormMode = "Tambah"
End Sub

Private Sub CBBATAL_Click()
    FormMode = "Ready"
    CbLock = False
    Unlok
    RefreshControl
End Sub

Private Sub CBEDIT_Click()
    CbLock = True
    Unlok
    FormMode = "Edit"
End Sub

Private Sub CBOK_Click()
Dim LnBrg As Integer
    If TBKode.Value = Empty Then
        MsgBox "Kode barang masih kosong", vbInformation, MsgboxTitle
        Exit Sub
    End If
    If TBNama.Value = Empty Then
        MsgBox "Nama barang masih kosong", vbInformation, MsgboxTitle
        Exit Sub
    End If
    If FormMode = "Tambah" Then
        LnBrg = SBBRG.Max + 1
    Else
        LnBrg = SBBRG.Value
    End If
    If Not CheckDup(TBKode.Value, "A", LnBrg, FormMode) Then GoTo ErrOk
    With ThisWorkbook.Sheets("DataBarang")
        Application.ScreenUpdating = True
        .Unprotect
        .Range("A" & LnBrg).Value = TBKode.Value
        .Range("B" & LnBrg).Value = TBNama.Value
        .Range("c" & LnBrg).Value = TBStok.Value
        .Range("d" & LnBrg).Value = TBSatuan.Value
        .Range("e" & LnBrg).Value = CBFILTERJENIS.Value
        MsgBox FormMode & " data berhasil", vbInformation, MsgboxTitle
        Simpan = True
        .Protect
        Application.ScreenUpdating = False
    End With
    If FormMode = "Tambah" Then
        Sekrol
        SBBRG.Value = SBBRG.Max
    End If
    CBBATAL_Click
    Exit Sub
ErrOk:
    MsgBox "No ID sudah dipakai", vbCritical, MsgboxTitle
    Exit Sub
End Sub

Private Sub SBBRG_Change()
    RefreshControl
End Sub

Private Sub TBHARGA_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    On Error GoTo ErrHarga
    harga = TBHARGA.Value
    TBHARGA.Value = FormatNumber(harga, 0, vbTrue, vbTrue, vbTrue)
    Exit Sub
ErrHarga:
    MsgBox "Hanya Boleh Berisi Angka Saja!", vbOKOnly + vbCritical, MsgboxTitle
    harga = 0
    TBHARGA = FormatNumber(harga, 0, vbTrue, vbTrue, vbTrue)
End Sub

Private Sub TBHARGA_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
    If IsNumeric(Chr(KeyAscii)) = False And KeyAscii <> vbKeyBack And KeyAscii <> 44 Then
        KeyAscii = 0
    End If
End Sub

Private Sub TBHARGA_Enter()
    TBHARGA.Value = harga
End Sub

Private Sub CBXKOLFILTER_Change()
    LBFILTER.RowSource = FilterBarang(TBFILTER.Value, CBXKOLFILTER.ListIndex)
End Sub

Private Sub LBFILTER_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim response As VbMsgBoxResult
    If LBFILTER.Value = Null Then Exit Sub
    response = MsgBox("tampilkan data " & LBFILTER.Value & " ??", vbYesNo + vbQuestion, MsgboxTitle)
    If response = vbNo Then Exit Sub
    SBBRG.Value = Application.WorksheetFunction.Match(LBFILTER.Value, ThisWorkbook.Sheets("DataBarang").Range("A:A"), 0)
End Sub

Private Sub TBFILTER_Change()
    LBFILTER.RowSource = FilterBarang(TBFILTER.Value, CBXKOLFILTER.ListIndex)
End Sub

Private Sub UserForm_Activate()
Dim text1 As control
Dim i As Integer
    Application.Calculation = xlCalculationManual
    ThisWorkbook.Activate
    Sheets("DataBarang").Select
    Application.ScreenUpdating = False
    Call Sekrol
    CBXKOLFILTER.Clear
    For i = 1 To 3
        CBXKOLFILTER.AddItem Sheets("DataBarang").Cells(1, i).Value
    Next i
    CBXKOLFILTER.ListIndex = 1
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(2, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(3, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(4, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(5, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(6, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(7, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(8, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(9, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(10, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(11, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(12, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(13, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(14, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(15, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(16, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(17, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(18, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(19, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(20, 1)
        CBFILTERJENIS.AddItem Sheets("DataBarang").Range("K:K").Cells(21, 1)
        CbLock = False
    Call Unlok
    FormMode = "Ready"
    Simpan = False
    Set text1 = Controls.Add("Forms.Label.1", "TT", True)
    text1.Move 12, 360, 420, 12
    text1.Caption = AuthorGen2()
    If SBBRG.Max = 1 Then
        MsgBox "Data masih kosong", vbInformation, MsgboxTitle
        Call CBTAMBAH_Click
        CBBATAL.Enabled = False
        Exit Sub
    End If
    RefreshControl
End Sub

Private Sub UserForm_Terminate()
    Application.Calculation = xlCalculationAutomatic
    Application.ScreenUpdating = True
    ThisWorkbook.Sheets("DataBarang").Range("A" & SBBRG.Value & ":E" & SBBRG.Value).Select
    ThisWorkbook.Sheets("DataBarang").Protect
    If Simpan Then ThisWorkbook.Save
End Sub

'=================================================================================
'                                                                         FFFFFFF
'=================================================================================

Private Function CheckDup(w As Variant, x As String, y As Integer, z As String) As Boolean
Dim TempCD1, TempCD2, RgLook
    On Error GoTo ErrCheckDup
    CheckDup = True
    RgLook = x & "1:" & x & SBBRG.Max
    TempCD1 = Application.WorksheetFunction.CountIf(ThisWorkbook.Sheets("DataBarang").Range(RgLook), w)
    If z = "Tambah" Then
        If TempCD1 > 0 Then CheckDup = False
    ElseIf z = "Edit" Then
        If TempCD1 > 1 Then
            CheckDup = False
        ElseIf TempCD1 = 1 Then
            TempCD2 = Application.WorksheetFunction.Match(w, ThisWorkbook.Sheets("DataBarang").Range(RgLook), 0)
            If TempCD2 <> y Then CheckDup = False
        End If
    End If
    Exit Function
ErrCheckDup:
    MsgBox "ErrCheckDup", vbCritical, MsgboxTitle
    CheckDup = False
End Function

'=================================================================================
' PPPPPPP
'=================================================================================

Private Sub Unlok()
    CBTambah.Enabled = Not CbLock
    CBEdit.Enabled = Not CbLock
    SBBRG.Enabled = Not CbLock
    CBOK.Enabled = CbLock
    CBBATAL.Enabled = CbLock
    TBKode.Locked = Not CbLock
    TBNama.Locked = Not CbLock
    TBStok.Locked = Not CbLock
End Sub

Private Sub Sekrol()
    SBBRG.Max = LastCell(ThisWorkbook.Name, "DataBarang", "A")
    If SBBRG.Max <= 1 Then
        SBBRG.Min = 1
    Else
        SBBRG.Min = 2
    End If
    SBBRG.LargeChange = Round(SBBRG.Max / 5, 0)
End Sub

Private Sub RefreshControl()
Dim JmlMasuk, JmlKeluar, JmlSisa
    With ThisWorkbook.Sheets("DataBarang")
        TBKode.Value = .Cells(SBBRG, 1).Value
        TBNama.Value = .Cells(SBBRG, 2).Value
        TBStok.Value = .Cells(SBBRG, 3).Value
    End With
End Sub

Private Sub CMDTutup_Click()
Unload Me
End Sub

- Tambahkan module1 pada project VBA editor lalu masukan kode dibawah ini; 


- Tambahkan module2 pada project VBA editor lalu masukan kode dibawah ini; 

Option Explicit
Public Function FilterBarang(KeyWord As String, Kolom As Integer) As String
Dim RwCount As Integer
    With ThisWorkbook.Sheets("TabelBarang")
        .Range("A:H").Clear
        .Cells(1, 1).Value = ThisWorkbook.Sheets("Databarang").Cells(1, Kolom + 1)
        If Kolom < 1 Then
            KeyWord = "*" & KeyWord
        Else
            KeyWord = KeyWord
        End If
        .Cells(2, 1).Value = KeyWord
        With ThisWorkbook.Sheets("Databarang")
            .Unprotect
            If ThisWorkbook.Sheets("Databarang").Range("A1").CurrentRegion.Rows.Count <= 1 Then
                FilterBarang = "TabelBarang!C2:E2"
                Exit Function
            End If
            .Protect
            If ThisWorkbook.Sheets("Databarang").Range("A65536").End(xlUp).Row = 1 Then Exit Function
        End With
        ThisWorkbook.Sheets("Databarang").Unprotect
        ThisWorkbook.Sheets("Databarang").Range("A1").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=.Range("A1:A2"), CopyToRange:=.Range("C1"), Unique:=False
        ThisWorkbook.Sheets("Databarang").Protect
        RwCount = Application.WorksheetFunction.CountA(.Range("C:C"))
        If RwCount < 2 Then RwCount = 2
        FilterBarang = "TabelBarang!C2:G" & RwCount
    End With
End Function

Public Function LastCell(x, y, z) As Integer
    With Workbooks(x).Sheets(y)
        .Unprotect
        LastCell = .Range(z & "1").CurrentRegion.Rows.Count
        .Protect
    End With
End Function

Public Function BrgDet(x, y)
Dim RgLook
Dim MatchLn
    With ThisWorkbook.Sheets("Databarang")
        .Unprotect
        If .Range("A1").CurrentRegion.Rows.Count <= 1 Then
            BrgDet = Empty
            Exit Function
        End If
        RgLook = "A1:A" & .Range("A1").CurrentRegion.Rows.Count
        MatchLn = Application.WorksheetFunction.Match(x, .Range(RgLook), 0)
        BrgDet = .Range(y & MatchLn).Value
        .Protect
    End With
End Function

Public Function kategori() As Integer
    With ThisWorkbook.Sheets("DataBarang")
        ListIndex = Range("A:H").Select
    End With
End Function

- Agar kode macro VB di atas dapat berjalan sebagaimana mestinya maka tambahkan worksheet baru pada workbook yang aktif lalu rename menjadi TabelBarang. 
- Untuk mencoba hasil dari kode macro tersebut tekal tombol F5 pada keyboard komputer atau laptop Anda. 

Bagaimana mudahkan? ok silahkan Anda mencoba tutorial ini !!! Jika ada yang perlu ditambahkan atau Anda masih merasa kesulitan maka Anda bisa menanyakan ataupun menginformasikan melalu kolom komentar dibawah ini. 
Sebagai bahan untuk latihan Anda juga bisa menggunakan file yang sudah jadi hasil dari tutorial ini dengan mendownload pada link dibawah ini:
 

BERITA LENGKAP DI HALAMAN BERIKUTNYA

Halaman Berikutnya

Subscribe to receive free email updates:

0 Response to "3 Langkah Mudah Membuat Form Isi Barang Di Excel Menggunakan UserForm"

Posting Komentar

close
==[ Klik disini 1X ] [ Close ]==