我正在尝试使用以下代码从电子表格中删除下拉列表:
Dim objShape As Shape
For Each objShape In ActiveSheet.Shapes
objShape.Delete
Next
但objShape
回报Application-Defined or Object-Defined Error
:
Debug.Print objShape.FormControlType
退货xlDropDown
Debug.Print objShape.Name
退货"Drop Down 250"
Debug.Print objShape.TopLeftCell
退货Application-Defined or Object-Defined Error
ActiveSheet.Cells.Validation.Delete
没有摆脱它,也没有使用ShapeRange
.
任何关于如何根除这个小虫子的建议将不胜感激。