J
JulieD
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
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