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 8103811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:39:28+00:00 2026-06-05T23:39:28+00:00

I have a listbox with multiselect options. I populate it using the addItem function.

  • 0

I have a listbox with multiselect options. I populate it using the addItem function.
I can’t find any article about this on Google, but I need to distinguish from the text displayed in the listbox and a real value.

For example:

shown      hiddenvalue
--------   -----------
monday     A1
tuesday    A2
wednesday  C7

etc.

Is it possible? How can I access these values?

  • 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-05T23:39:30+00:00Added an answer on June 5, 2026 at 11:39 pm

    For VBA listbox you want to:

    1. Declare two columns (ColumnCount = 2).
    2. Make the second one hidden: ColumnWidths = ";0".
    3. Declare the second column as bound (BoundColumn = 2) and the first column as textual (TextColumn = 1).
    4. Have a procedure to add values:

      Private Sub AddWithID(Text As String, ID As String)
        ListBox1.AddItem Text
        ListBox1.List(ListBox1.ListCount - 1, 1) = ID
      End Sub
      

    Now, for single-select listbox, you can use .Value or .Text to find out selected value/text.

    For multi-select listbox, you can use .List(i, 0) for text and .List(i, 1) for value, where i in an index of a row.

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

Sidebar

Related Questions

I have a multiselect listbox and before submitting the form i want to check
I have a multiselect listbox and depending on how many elements user will choose
I have a multiselect ListBox in a FormPanel in GWT. I have set the
I have one WPF ListBox loaded using LINQ: lbxCalculosSec.ItemsSource = from p in database.CALCULOS
I have a ListBox in a WinForm with multiselect enabled. The selected items appear
I have a listbox in a Microsoft Access form. The MultiSelect property is set
I have listbox, button, and textbox controls in a Windows application. How can I
I have ListBox and want to put values in this listbox from a DataTable
I am implementing this JQuery UI multiselect from http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ I have managed to get
I have a multi-select listbox in a SL3 app using prism and I need

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.