PDA

View Full Version : Solved: multi-column list box



MUSASHI
11-03-2004, 07:29 PM
I have a userform with a list box. I have a named range (3 columns),

in userform properties, I set Bound Column to 1, column count to 3. I see the 3 columns from my range in the object view, yet when I run the userform, I only see the first column.... I see the header now, but only 1 column of data. Trying to do this from a range vs. an array..

What the heck else....Im reading the stuff right out of JWalks book on Excel 2000....

Thanks Mus:help

MUSASHI
11-03-2004, 10:16 PM
Private Sub UserForm_Initialize()
LastRow = Range("A65536").End(xlUp).Row
ListBox1.RowSource = "A3:A" & LastRow
End Sub

changed to this,,,duh
Private Sub UserForm_Initialize()
LastRow = Range("A65536").End(xlUp).Row
ListBox1.RowSource = "A3:C" & LastRow
End Sub

2 hours later...lol

johnske
11-03-2004, 10:27 PM
Hi Musashi,

Try this also

mdmackillop
11-04-2004, 02:00 AM
Hi Musashi,
Inspired by John's combo, I spent a wet afternoon trying to make it more automated. Here's where it stands so far. Ideally, the userform will give a "click in columns" source for the combo, on completion. For the moment, change the Const values.
MD
http://www.geocities.com/mdmackillop/mytest.xls

johnske
11-04-2004, 03:01 AM
Hi MD,

This example shows both a combo and list box (selection is enabled for the list box only in the E.G.) this assumes that each item is on the same sheet and does not come from different sheets.

I thought that the nature of multi-col list/combo boxes was that you couldn't select individual items in the different cols, if you can do this it makes the use of multi-cols much more flexible......

John :bink:

mdmackillop
11-04-2004, 06:39 AM
Hi John,
What I meant was that the source data for the combo would be selected by clicking in a selection of columns, eg G; A; B or such like, and the bound column could be chosen by adding a number to a textbox. Something to play around with, maybe, but I'm not sure about practical end uses.
MD
Updated version http://www.geocities.com/mdmackillop/mytest.xls

MUSASHI
11-04-2004, 02:23 PM
thanks folks.

What I am trying to accomplish is something that I know I have seen before but cant seem to find again.

That is where I have multiple named ranges on a sheet. I want the names of ranges to show up in combobox....I got that part, additem method. But where I am struggling is when i make a selection in combobox, I want the data in my list box to change to the corresponding range.

In my example, its based on training, I would have some medical things, some safety training, some 3rd Party training etc etc. My named ranges for each would contain the various possible items for each category of training.

Ultimately, when i open this form, I select an employee, I select a training type from combo , then I select the multi items out of the list, click a cmdbutton and capture the record of the training. I have everything else but, the multiple potential ranges selected from a combo that will appear in listbx (lbTraining).

Any ideas?

Thanks (please no kicking):roll:

mdmackillop
11-04-2004, 03:16 PM
Hi Musashi,
Starter for ten (as we say here). http://www.geocities.com/mdmackillop/ComboList.xls
MD

MUSASHI
11-04-2004, 06:26 PM
Man MD,

that certainly does it, problem is, I dont know how yet...haha
I owe ya a pint!;) The global sheet dealie....off to search that out...

Thx a bunch (Muchas Gracias is how we say it down here in South Texas)


Mus