Populate combobox based on text value in userform

namuser

New Member
Joined
Jan 21, 2014
Messages
4
Hi
I have a table with 3 columns: Products, Location and Quantity. I created a userform to add new products and the code runs fine. Still, I would like my userform to do the following:

-if someone tries to add a product and that product exist in different location, I would like to view those location in a combobox (?not sure, never used one). Under the combobox I would like to list number of locations ( like a text: Your products is listed in 3 other location). If I don't choose a location, the user can add a new one but if another location is chosen, a textfield called Quantity will be populated.

I hope this can be done, I searched the web but I didn't find anything similar to this. I don't even know if I should use a combobox for what I need.
I do hope someone can help me with an advice, a link or some code to get my started....

Thank you!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
How is the user adding a product and what/where are they adding it to?
 
Upvote 0
in my initial work, the user added a product via userform to first empty cell in the table (sheet1). The userform had 3 textboxes: product name (unique), location (same unique item can be in different locations) and quantity.
My first intention was to create another userform only with a textbox for product name, and a search button. Pressing search would have populated another sheet (called locations) with all the locations and quantity where you can find that specific item.

But I would really like to be able to add products but also edit quantities for all product's locations (add and substract).
I'm realizing that doing this is not a simple task (at least for me) but I would like to know if this can be done...
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top