Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default 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
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
How to find a value with multi-column, multi-record list Dallasm Excel Worksheet Functions 1 May 30th 10 05:40 PM
Multi-Column Drop-down list ? JB Excel Discussion (Misc queries) 1 December 26th 05 06:30 PM
Extract values from a multi-select multi-column list-box Peter[_20_] Excel Programming 5 September 28th 03 04:04 PM
Multi-column list box with headers question... Thurman Excel Programming 6 September 23rd 03 03:59 AM
Multi column Data Validation List Chris Excel Programming 1 September 17th 03 04:20 AM


All times are GMT +1. The time now is 07:01 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"