RJSIGKITS
Board Regular
- Joined
- Apr 15, 2013
- Messages
- 109
Hi Guys - I think this one will be a really simple one for you that know, but I'm stuck!
So, I have a user form in which the user enters a product code into a textbox (TextBox1)
They hit the CommandButton to get a description and a price for that item.
I currently have this:
"Description" and "Price" are named Label fields, which should show the relevant results.
"Allprods" is the sheet name that has all the products on, which has approximately 30,000 products, and this data has also been saved as a TableArray, also called "AllProds".
Column 1 is the column that has the product codes in.
Column 2 is the column that has the Descriptions in.
Column 8 is the column that has the prices in.
This also needs to display a message if there are no items found for the code entered.
So, I have a user form in which the user enters a product code into a textbox (TextBox1)
They hit the CommandButton to get a description and a price for that item.
I currently have this:
Code:
Private Sub CommandButton1_Click()Description = Application.WorksheetFunction.VLookup(TextBox1.Text, AllProds, 2, 0)
Price = Application.WorksheetFunction.VLookup(TextBox1.Text, AllProds, 8, 0)
End Sub
"Description" and "Price" are named Label fields, which should show the relevant results.
"Allprods" is the sheet name that has all the products on, which has approximately 30,000 products, and this data has also been saved as a TableArray, also called "AllProds".
Column 1 is the column that has the product codes in.
Column 2 is the column that has the Descriptions in.
Column 8 is the column that has the prices in.
This also needs to display a message if there are no items found for the code entered.