主题
RemoveAllItems (方法)
删除 ET 列表框或组合框中的所有数据项。
示例
python
#本示例删除一个列表框中的所有数据项。如果 `Shapes.Item(2)` 代表的不是列表框,则本示例将无效
def test():
Worksheets.Item(1).Shapes.Item(2).ControlFormat.RemoveAllItems()
python
#本示例删除活动工作表上第一个形状(组合框)的所有数据项
def test():
shape = ActiveSheet.Shapes.Item(1)
shape.ControlFormat.RemoveAllItems()