Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8269225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:09:08+00:00 2026-06-08T06:09:08+00:00

I have a listbox with multiple selection activated and i am trying to read

  • 0

I have a listbox with multiple selection activated and i am trying to read the different selected values

I have tried many snippets, here are the latest two :

 For i = 0 To ListBox1.SelectedIndices.Count
     MsgBox(ListBox1.Items((ListBox1.SelectedIndices(i))).value)
 Next


 For i = 0 To ListBox1.SelectedItems.Count
     MsgBox(ListBox1.SelectedItems(i).value)
 Next

For some reason with any approach i choose i can’t read any item’s value

My listbox is data bound, so i found out on a forum that making it public might fix the issue but it did not

I am hesitating as even Intellisense doesn’t show much info, all i get is :

Equals
GetHashCode
GeType
ReferenceEquals
ToString

Any ideas where i went wrong?

Thanks in advance

Edit:

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:09:10+00:00Added an answer on June 8, 2026 at 6:09 am

    I’m not a big fan of using the Data GUI tools in VB. That said, I think what you are looking for is this:

    For Each dvRow As DataRowView In Me.Listbox1.SelectedItems
      MessageBox.Show(dvRow("Id").ToString)
    Next
    

    If you were interested in the Last Name field, change “Id” to “Last Name”.

    Also, I used MessageBox.Show instead of MsgBox. MsgBox is a leftover from VB6.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ListBox with multiple selection. And I am doing drag and drop
I have a WPF ListBox that I would like to Enable multiple selection in
I have a listbox that a user can select multiple values from . each
I have a ListBox that can have multiple items selected at once. I have
I have a multiple selection listbox in which I insert items using javascript. At
I would like to make a multiple selection listbox in HTML that can have
I have a multiple selection listbox on a web form which lists various internal
I have a listbox with selection mode is multiple <asp:ListBox id=Listbox1 runat=server Width=230px Height=168px
I have a Listbox that allows user to select multiple items. Normally user can
I have a ListBox which is made up of Grid Items in Multiple SelectionMode

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.