Kaoutar

New Member
Joined
Feb 5, 2018
Messages
1
Hi all,

I am working on a form that includes product selection through drop-down menus. It starts off with a product category, a chosen category predefines a choice of product names. After choosing a product name, the user needs to select two parameters which both depend on the product name. My challenge is in having these two lists depend on the unique product name.

Can anyone help me think this through?

Thanks in advance for the help.

Kaoutar
 

Some videos you may like

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.

ranman256

Well-known Member
Joined
Jun 17, 2014
Messages
1,956
on the afterupdate event of cboCATA, clear and reload items that only have that cata

Code:
sub cboCata_afterUpdate()
  LoadProducts
end sub

Sub LoadProducts()
Dim vProd, vCata

cboProd.Clear
Sheets("Products").Select
Range("A2").Select
  'product is in A
  'cata is in B
While ActiveCell.Value <> ""
     vProd = activeCell.Offset(0, 0).Value
     vCata = activeCell.Offset(0, 1).Value
     
     If vCata = cboCata Then cboProd.AddItem vProd         'load product that has the Cata
          
     ActiveCell.Offset(1, 0).Select  'next row
Wend
End Sub
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,123,133
Messages
5,599,912
Members
414,347
Latest member
tbanack

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
Top