Click here to Skip to main content
15,918,168 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:


This ListBox From Excel for VBE
How to get this ListBox text Content?
thank you very much!
Posted
Comments
Christian Graus 19-Jul-10 23:06pm    
you need to clarify what you mean, what language you're using, etc. Where does this come from ? What do you want to get, the contents, the selection ?

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
 
Share this answer
 
But the listbox in External process.
 
Share this answer
 
Comments
Christian Graus 20-Jul-10 2:27am    
First of all, the 'answer' button is for answers, the 'comment' button is for comment. Hence the labels. Second, if the listbox is an external process, you should have said so when I asked you to clarify your vague and confusing question. Third, in that case, if you're using VBE, I doubt very much it can be done, and if you are not, you, again, should have clarified your vague and poorly worded question to make that clear.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900