VBA存储string,而不是范围在ListFillRange ActiveXcombobox
我已经研究,但一直无法find是否有可能在ActiveXcombobox中存储一个string,而不是一个范围。
我的工作簿有这么多的依赖关系,每当用户input任何types的公式时,都会重新计算ComboBox等等。 我已经粘贴了基于公式的范围内的值,这有助于和closures计算无济于事。 任何指导表示赞赏。
更新 – combobox被绑定,这是设置范围的一个例子。
ThisWorkbook.Worksheets("Securities").OLEObjects("cboList").ListFillRange = "Securities!" & Range("mySecurities").Address
使用ControlFormat属性的AddItem方法:
With Sheet1.Shapes("ComboBox1").ControlFormat .AddItem "Sunday" .AddItem "Monday" .AddItem "Tuesday" End With