• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Textbox into vlookup

ajiscullens

New Member
Hello VBA expert

can some one teach me how to add code for my text box into vlookup from cbocode drop down list ?

1) problem to add transaction . it keeps add at the same row
2) can't find way to add vlookup from my data sheet into form
3) i try to create transaction number continuously



this is my code

>>> use code - tags <<<
Code:
Private Sub cmdAdd_Click()
'Copy input values to sheet.
    Dim lRow As Long
    Dim ws As Worksheet
    Set ws = Worksheets("IN")
    lRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(5, 0).Row
    With ws
        .Cells(lRow, 3).Value = Me.txtNumber.Value
        .Cells(lRow, 4).Value = Me.cboCode.Value
        .Cells(lRow, 5).Value = Me.txtItem.Value
        .Cells(lRow, 6).Value = Me.txtDate.Value
        .Cells(lRow, 7).Value = Me.txtSupplier.Value
        .Cells(lRow, 8).Value = Me.txtQuantity.Value
    End With
    'Clear input controls.
    Me.txtNumber.Value = ""
    Me.cboCode.Value = ""
    Me.txtItem.Value = ""
    Me.txtDate.Value = ""
    Me.txtSupplier.Value = ""
    Me.txtQuantity.Value = ""
End Sub

Private Sub cmdClear_Click()
    'Clear input controls.
    Me.txtNumber.Value = ""
    Me.cboCode.Value = ""
    Me.txtItem.Value = ""
    Me.txtDate.Value = ""
    Me.txtSupplier.Value = ""
    Me.txtQuantity.Value = ""
End Sub



Private Sub cmdClose_Click()
    'Close UserForm1.
    Unload Me
End Sub
 

Attachments

  • INVENTORY REPORT V1.xlsm
    37.1 KB · Views: 1
Last edited by a moderator:
Does this help?
ok thanks

but the problem is..code must link with item...example code BWG-10KG = BAWANG BESAR 10kg

i want to make drop down list code and auto fill in item
if i choose code BWG-10KG on drop down list
item below will auto show up BAWANG BESAR 10kg
then i will fill up supplier quantity and date for record input..
 
Back
Top