Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default 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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort a multi column listbox in userform Martin Excel Programming 3 August 7th 05 09:18 PM
Multi Selection in a ListBox Claus Mygind Excel Programming 3 April 27th 05 03:23 PM
Colum heads in multcolumn listbox Alen32 Excel Programming 1 March 15th 05 07:31 PM
Multi-select listbox help! John[_60_] Excel Programming 3 October 9th 04 01:57 AM
Multi-columns in a ListBox Tom Atkisson Excel Programming 1 October 5th 03 10:27 PM


All times are GMT +1. The time now is 07:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"