+ Reply to Thread
Results 1 to 3 of 3

Multi Colum Listbox in UserForm

  1. #1
    Zani
    Guest

    Multi Colum Listbox in UserForm

    Hello all you clever people!

    Been having some success with listboxes to collect data on Userforms, but
    what I would like to try and do now is have a multi colum listbox, ie I have
    the main selection of a "Business Unit" which depending on the choice made
    will offer up a list of "Business Area", again depending on the choice made
    here then a list of "Departments" to be shown. Is it possible to do this,
    can anyone point me in the right direction?
    --
    Zani
    (if I have posted here, I really am stuck!)


  2. #2
    Bob Phillips
    Guest

    Re: Multi Colum Listbox in UserForm

    That's not a multi-column listbox, but a multi, dependent listboxes.

    Best way is to have an initial Business Unit list on a worksheet and bind
    Listbox1 to that, and have a list for all options, named appropriately, for
    example

    BUs
    Sales
    Finance
    HR
    etc.

    and then have lists for each, such as

    Sales
    Corporate
    Retail
    Internal
    etc,

    and use a named range, say bu_Sales for this. Create the other lists as
    well, then in the code, when a selection is made in Listbox1

    Listbox2.RowSource = Range("bu_" & Listbox1.Value).Address(,,,True)

    which will load Listbox2 with the appropriate data.

    Do the same for the Business Areas.


    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Zani" <[email protected]> wrote in message
    news:[email protected]...
    > Hello all you clever people!
    >
    > Been having some success with listboxes to collect data on Userforms, but
    > what I would like to try and do now is have a multi colum listbox, ie I

    have
    > the main selection of a "Business Unit" which depending on the choice made
    > will offer up a list of "Business Area", again depending on the choice

    made
    > here then a list of "Departments" to be shown. Is it possible to do this,
    > can anyone point me in the right direction?
    > --
    > Zani
    > (if I have posted here, I really am stuck!)
    >




  3. #3
    Zani
    Guest

    Re: Multi Colum Listbox in UserForm

    Thanks Bob you are a star! That is exactly what I needed, and it all seems
    so simple now!
    --
    Zani
    (if I have posted here, I really am stuck!)



    "Bob Phillips" wrote:

    > That's not a multi-column listbox, but a multi, dependent listboxes.
    >
    > Best way is to have an initial Business Unit list on a worksheet and bind
    > Listbox1 to that, and have a list for all options, named appropriately, for
    > example
    >
    > BUs
    > Sales
    > Finance
    > HR
    > etc.
    >
    > and then have lists for each, such as
    >
    > Sales
    > Corporate
    > Retail
    > Internal
    > etc,
    >
    > and use a named range, say bu_Sales for this. Create the other lists as
    > well, then in the code, when a selection is made in Listbox1
    >
    > Listbox2.RowSource = Range("bu_" & Listbox1.Value).Address(,,,True)
    >
    > which will load Listbox2 with the appropriate data.
    >
    > Do the same for the Business Areas.
    >
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "Zani" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hello all you clever people!
    > >
    > > Been having some success with listboxes to collect data on Userforms, but
    > > what I would like to try and do now is have a multi colum listbox, ie I

    > have
    > > the main selection of a "Business Unit" which depending on the choice made
    > > will offer up a list of "Business Area", again depending on the choice

    > made
    > > here then a list of "Departments" to be shown. Is it possible to do this,
    > > can anyone point me in the right direction?
    > > --
    > > Zani
    > > (if I have posted here, I really am stuck!)
    > >

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1