Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
multi column list boxes
Hi All
haven't played with list boxes much at all ... and am now trying to incorporate two into a userform .. with an "add" & "remove" button to move records from one to the other - all this works fine but what i'ld like to do is make one of the list boxes multi-columned and can't seem to figure it. Scenario is i have a list of vessels in a combo box, once a vessel is located all the containers on this vessel are listed in the first list box (lst1). I then have a command button which when pressed populates the other list box (lst2) with all the containers that have not yet been shipped. This list is populated by code cycling through a range returning the containers that do not have "shipped" in a column to the right of the container number for each cell in rng if cell.offset(0,2).value < "shipped" then userform11.lst2.additem cell.value end if next however, some of these containers are assigned to other ships and some haven't been assigned to anything. So what i'ld like to do is in lst2 also show the vessel (if any) that they've been assigned to (cell.offset(0,4).value) - the only examples of multi-column list boxes use arrays, and as i don't know how many containers i could have at any one time i don't know how to define the array. Would appreciate any assistance. Regards JulieD |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
multi column list boxes
Userform11.ColumnCount = 2
for each cell in rng if cell.offset(0,2).value < "shipped" then userform11.lst2.additem cell.value Userform11.Lst2.List(Userform11.lst2.Listcount-1,1) = _ cell.offset(0,4).Value end if next -- Regards, Tom Ogilvy "JulieD" wrote in message ... Hi All haven't played with list boxes much at all ... and am now trying to incorporate two into a userform .. with an "add" & "remove" button to move records from one to the other - all this works fine but what i'ld like to do is make one of the list boxes multi-columned and can't seem to figure it. Scenario is i have a list of vessels in a combo box, once a vessel is located all the containers on this vessel are listed in the first list box (lst1). I then have a command button which when pressed populates the other list box (lst2) with all the containers that have not yet been shipped. This list is populated by code cycling through a range returning the containers that do not have "shipped" in a column to the right of the container number for each cell in rng if cell.offset(0,2).value < "shipped" then userform11.lst2.additem cell.value end if next however, some of these containers are assigned to other ships and some haven't been assigned to anything. So what i'ld like to do is in lst2 also show the vessel (if any) that they've been assigned to (cell.offset(0,4).value) - the only examples of multi-column list boxes use arrays, and as i don't know how many containers i could have at any one time i don't know how to define the array. Would appreciate any assistance. Regards JulieD |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
multi column list boxes
Hi Tom
thanks for this ... will help a lot. Cheers JulieD "Tom Ogilvy" wrote in message ... Userform11.ColumnCount = 2 for each cell in rng if cell.offset(0,2).value < "shipped" then userform11.lst2.additem cell.value Userform11.Lst2.List(Userform11.lst2.Listcount-1,1) = _ cell.offset(0,4).Value end if next -- Regards, Tom Ogilvy "JulieD" wrote in message ... Hi All haven't played with list boxes much at all ... and am now trying to incorporate two into a userform .. with an "add" & "remove" button to move records from one to the other - all this works fine but what i'ld like to do is make one of the list boxes multi-columned and can't seem to figure it. Scenario is i have a list of vessels in a combo box, once a vessel is located all the containers on this vessel are listed in the first list box (lst1). I then have a command button which when pressed populates the other list box (lst2) with all the containers that have not yet been shipped. This list is populated by code cycling through a range returning the containers that do not have "shipped" in a column to the right of the container number for each cell in rng if cell.offset(0,2).value < "shipped" then userform11.lst2.additem cell.value end if next however, some of these containers are assigned to other ships and some haven't been assigned to anything. So what i'ld like to do is in lst2 also show the vessel (if any) that they've been assigned to (cell.offset(0,4).value) - the only examples of multi-column list boxes use arrays, and as i don't know how many containers i could have at any one time i don't know how to define the array. Would appreciate any assistance. Regards JulieD |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to find a value with multi-column, multi-record list | Excel Worksheet Functions | |||
Multi-Column Drop-down list ? | Excel Discussion (Misc queries) | |||
Extract values from a multi-select multi-column list-box | Excel Programming | |||
Multi-column list box with headers question... | Excel Programming | |||
Multi column Data Validation List | Excel Programming |