I want to point out the danger of using loops
Let's start from the beginning, though.
Let's assume that in the sheet, in addition to the DropDown controls we inserted ourselves, there are also cells with drop-down lists (from data validation). The control that develops the list is sometimes classified (*) to the xlDropDown type when we search the Shapes collection. For all validation lists in active sheet, there is only one control whose position changes depending on the data validation cell that is currently active. As you might guess, the control is removed in the loop quoted above. Fortunately, when the file is reopened, the control is rebuilt.
However, this control is not part of the DropDowns collection ( by default hidden since version 2007). At least that's what the tests show.
* I purposely used the phrase "sometimes classified", because from testing it seems that it varies with this. Once it is, and other times it is not so classified. I have already encountered the ambiguity of the classification of graphic objects in the past with the Pictures collection. But I never learned the reason for this behavior.
Artik
Bookmarks