Looks like you might have two different versions of this when you wake up.
Made a few assumptions that might not be correct ...
Assume that you want the list to come from cells A2:A7, and that this list will grow.
Created a name “Fournisseur”. The RefersTo for this Name is the formula:
=OFFSET(Fournisseurs!$A$2,0,0,COUNTA(Fournisseurs!$A:$A),1)
Added Data Validation to range D4:D52 on each of the three Agent sheets
Took the code that Carim suggested and changed it to be workbook-level, as noted earlier. So, all of that code is in the ThisWorkbook object’s code window.
Seems it works. The combo box display upon double-click of a cell with data validation. But, only if the CODENAME of the sheet is like “Feuil*”
The combobox will auto-complete and will put the result back in the cell.
To get the combo box to disappear, you have to either click in a cell or switch to another sheet.
Also, added code to ensure that all agent worksheets have a combo box. Right now, I am doing that at workbook_open, and it is based on the sheet having CODENAME of “Feuil*”.
If you have no idea what I mean by CODENAME of “Feuil*”, then I’ll change that for you. I just noticed this feature and assumed it was of your design.
Bookmarks