Dim myVar as string
myVar = me.myList ' this will get the bound column of the selected item from the list box
myVar = me.myList.column(1) 'will get the the second column of the listbox selected item
Main Topics
Browse All TopicsGood monring,
This is a simple question: I need to capture the item selected in a ListBox and store it in a variable. Some thing like the following:
Dim myVar as string
myVar = myList.itemSelected
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I don't think I made myself clear. What I need is the selected item in the list.... if, say, the list contains 7 items and the user selects one of them, I want the variable to store that item, not its index on the list, but the item as it's written in the list... this is why i used a string variable.
Business Accounts
Answer for Membership
by: capricorn1Posted on 2009-08-24 at 07:13:11ID: 25168463
Dim myVar as string
myVar = me.myList