Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Making a Dynamic List in Listbox

Is it possible to change the length of a list using
listbox? I have 2 listboxes on a worksheet, the first
containing a (fixed) list of the 50 states (A1:A50). On
choosing a state I copy a list of county names into column
B, to which the second listbox is set, using the
ListFillRange property. Is thre some way to change the
ListFillRange to become the right length when the state
changes?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Making a Dynamic List in Listbox

Never mind, I found outhow to do it -- I thought the
argument for ListFillRange was a range, but it's a string,
"B1:Bxx"

-----Original Message-----
Is it possible to change the length of a list using
listbox? I have 2 listboxes on a worksheet, the first
containing a (fixed) list of the 50 states (A1:A50). On
choosing a state I copy a list of county names into column
B, to which the second listbox is set, using the
ListFillRange property. Is thre some way to change the
ListFillRange to become the right length when the state
changes?
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Making a Dynamic List in Listbox

In the click event of the first listbox, populate your range, then set the
listfillrange property of the second listbox

With worksheets("Data")
set rng = .Range(.cells(1,2),.cells(1,2).End(xldown))
End With
Listbox2.ListFillRange = rng.address(external:=True)

--
Regards,
Tom Ogilvy

"MikeM" wrote in message
...
Is it possible to change the length of a list using
listbox? I have 2 listboxes on a worksheet, the first
containing a (fixed) list of the 50 states (A1:A50). On
choosing a state I copy a list of county names into column
B, to which the second listbox is set, using the
ListFillRange property. Is thre some way to change the
ListFillRange to become the right length when the state
changes?



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
Dynamic link with 2 dependent listbox? Cam Excel Discussion (Misc queries) 0 April 8th 09 06:51 PM
Making condition dynamic? aposatsk Excel Discussion (Misc queries) 3 August 16th 06 01:43 PM
Making a dynamic list?! mayerc Excel Discussion (Misc queries) 2 June 15th 06 03:47 PM
Making path of linked cell dynamic Negentropy Excel Discussion (Misc queries) 3 September 24th 05 09:02 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM


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