How should I make a ListBox in Excel into a Date Sorce?

Testested 61 Reputation points

How should I make a List Box in Excel into a Date Sorce?

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,293 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,611 questions
{count} votes

Accepted answer
  1. Oskar Shon 866 Reputation points MVP

    aaa long time... and easy answer using code write up... hmm
    ok learn

     Dim x&, y&  
     For x = 1 To ListBox1.ColumnCount  
           For y = 1 To ListBox1.ListCount  
                If x = 1 Then Cells(y, 2) = ListBox1.List(y - 1, x - 1)  
                If x = 2 Then Cells(y, 1) = ListBox1.List(y - 1, x - 1)  

    X variable I using for columns, then switch that is a easy job to do. Its done.

    So exercise for you now - you must read about that and make it.
    If you had a more than 2 columns in control, learn about back loop without condition, to switch it opposite count. Do you?

6 additional answers

Sort by: Most helpful
  1. Testested 61 Reputation points

    I am very new with VBA.. I would like to use a List Box for a data source. Is this possible?

  2. Testested 61 Reputation points
    0 comments No comments

  3. Oskar Shon 866 Reputation points MVP

    I guess.
    you can see list box using in worksheet as object ActiveX


    or you can use the same in VBA Form as control


    0 comments No comments

  4. Testested 61 Reputation points

    Hi, @Oskar Shon

    Please see snipping below. I am trying to push data from a Listbox to a spreadsheet.

    0 comments No comments