Hi everyone,

After searching for a solution for 2 days I have given up and decided to ask for help. I am fairly new to vba so please forgive any potential stupidity.

Here is my scenario; I have a userform with 2 textboxes, when the command button is pressed I need to open a new userform that returns information from a sheet with almost 10000 rows of information. This hidden sheet is my main "database" and other users are not meant to view this. they can only use the userforms that I have created to view and add information to the database.

Currently I have 2 userforms for this search system. 1 has 2 textboxes and the other has a few Labels of which the captions are fild in by the command. In the command button I have the following code:

Please Login or Register  to view this content.
I'll explain a little further what problems I am facing. The database is filled with clothing Items. Each size has a different row, with different scanning codes etc, but for 1 article all sizes have the same name/article code. Textbox1 is the input for the article name, textbox 2 for the size. This means that neither the product name column (D) nor the sizes column (H) has unique values, but each combination of the 2 is unique. The code above will work for the first size listed (the first instance of the name in column D) but for the rest of the values t gives an error, I think it has to do with the loop that I need it to do if the match isn't found, but I have tried everything I can think of and cant get it to work.

If my explaining of the situation sucks then I can make a dummy sheet, but I don't have one available and I cant upload the real data. Let me know If I can supply anything more and thanks in advance for the help.