Listbox ListFillRange [英] Listbox ListFillRange
本文介绍了Listbox ListFillRange的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Sheet1.Shapes(ListBox1)。ListFillRange =A1:A10
我想用范围填充列表框,但是我收到运行时错误'438',对象不支持此属性或方法。我在这里缺少什么?
解决方案
如果是表单列表框,请使用以下命令:图形(ListBox1)。ControlFormat.ListFillRange =A1:A10
$ b $ / code>
或与范围
对象:
With Worksheets(Sheet1)
.Shapes(ListBox1)。ControlFormat.List = .Range(A1:A10)。
结束
I have inserted a form control listbox on my sheet. For some reason this errors out.
Sheet1.Shapes("ListBox1").ListFillRange = "A1:A10"
I'd like to fill the listbox with the range but I get a Run-time error '438', Object doesn't support this property or method. What am I missing here?
解决方案
If it is Form listbox, use this one:
Worksheets("Sheet1").Shapes("ListBox1").ControlFormat.ListFillRange = "A1:A10"
or with Range
object:
With Worksheets("Sheet1")
.Shapes("ListBox1").ControlFormat.List = .Range("A1:A10").Value
End With
这篇关于Listbox ListFillRange的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文