take value from 2 multi listboxes and search row for criteri

  • Hi,


    I have a form with 2 multi listboxes (listbox1 and listbox2).


    I would like to take the values of these listboxes and search for (contains within) the output of listbox1 in column G and search for (contains within) the output of listbox2 in column H.


    Once a matches have been found I would like to copy the entire row(s) to a new sheet



    Example


    [ATTACH=CONFIG]65229[/ATTACH]



    Does this sound possible?


    Thanks


    Gary

  • Re: take value from 2 multi listboxes and search row for criteri


    try this



  • Re: take value from 2 multi listboxes and search row for criteri


    Thanks for the quick reply,


    Works ok with a combo box up until


    Code
    If ran.Row <> ran1.Row Then


    But get NULL output when using listbox, don't think i'll get this to work, probably best using check boxes?


    Gary

  • Re: take value from 2 multi listboxes and search row for criteri


    you have to give the value of list box into the lst1 and listbox 2 into lst2...


    lst1 = Me.listbox1.Value lst2 = Me.listbox2.Value <---- see that you are passing the right values here i didnt checked it with list box .


    if the null value passes into this string hopefully it will not run.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!