Can not get code to work

  • Hi,

    I have a userform with a few textboxes and comboboxes some that self populate from a data base, what I need it to do is if they select OUT from combobox 1 the textbox self populates from a database they then choose an amount from the combobox 2 lets say 5 then when the command button is clicked it then finds a match from the worksheet named Data that matched the text from textbox 1 and adds the value from combobox 2 in to the worksheet. I have attached a little mock up and filled the values in so you only need to click the command button. I can not seem to get it to work, any help would be great.


    Hope this make sense..


  • Possibly...

    If I've been helpful, let me know. If I haven't, let me know that too.

  • Hi,


    Just one more thing if you don't mind, if the user selects IN from combobox 1 and when textbox 1 has auto populated how would I go about showing the row that it has matched in a list box. Would it go something like

  • Not that familiar with UserForms, but possibly...

    If this isn't a solution, I suggest starting a new thread.

    If I've been helpful, let me know. If I haven't, let me know that too.

  • dangelor,


    First of all thank you for all your help so far.


    It works but the only problem is it just keeps showing me the data from the last row all the time no matter if I choose IN or OUT, it is not showing the data for the match from textbox 1