I have a userform that when it runs comes up with a blank text box. I want the user to be able to type in the value that they want to lookup, in this case it is a box size, and once they press enter I need it to put all the matching information on the same sheet that I have my macro button that opens the userform.
In a separate sheet, my lookup sheet, there is an extensive list of box sizes in the first column and then there are 3 more columns. Each box size appears more than once so in the return sheet I would need it to list out each matching data row.
The issue that I am having is that I can't seem to find a way to match the text box value to the range of values that I have - I defined the row of boxes as a named range "Boxes".
The code line I tried to use to match it when the enter button is pressed was:
If TextBox.Value = Worksheets("Lookup Draft").Range("Boxes").Find(TextBox) Then
... (code with a loop) ...
Else
MsgBox("No Box Size Matches")
End If
Currently, for every box size that I put in the text box I only get the message box even though I know it has at least one matching value.
How do I match the two?
In a separate sheet, my lookup sheet, there is an extensive list of box sizes in the first column and then there are 3 more columns. Each box size appears more than once so in the return sheet I would need it to list out each matching data row.
The issue that I am having is that I can't seem to find a way to match the text box value to the range of values that I have - I defined the row of boxes as a named range "Boxes".
The code line I tried to use to match it when the enter button is pressed was:
If TextBox.Value = Worksheets("Lookup Draft").Range("Boxes").Find(TextBox) Then
... (code with a loop) ...
Else
MsgBox("No Box Size Matches")
End If
Currently, for every box size that I put in the text box I only get the message box even though I know it has at least one matching value.
How do I match the two?