如何获取列表框文本 [英] How to get the ListBox Text
本文介绍了如何获取列表框文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Excel for VBE的此列表框
如何获取此ListBox文本内容?
This ListBox From Excel for VBE
How to get this ListBox text Content?
thank you very much!
推荐答案
看看这是否能满足您的需求:
将Dim mtemp作为对象
昏暗的myList
变暗的LItem作为变体
''将mtemp设置为ListBox对象.
设置mtemp = DialogSheets(1).ListBoxes(1)
''设置mtemp = myList.
myList = mtemp.List
''创建每个循环.
对于myList中的每个LItem
''显示所选项目.
MsgBox Litem
下一页
See if this gives you what you want:
Dim mtemp As Object
Dim myList
Dim LItem As Variant
''Set mtemp as a ListBox object.
Set mtemp = DialogSheets(1).ListBoxes(1)
''Set mtemp = myList.
myList = mtemp.List
''Create a For-Each Loop.
For Each LItem In myList
''Display the selected item.
MsgBox Litem
Next
但是外部进程中的列表框.
But the listbox in External process.
这篇关于如何获取列表框文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文