Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default using a variable length list to poplate a List Box

I have a spreadsheet with a list of values which can be modified by others
with extra entries.
I need to populate t a List Box with all the entries taking into account how
many there are now in the list.
Is there a way to automatically set/update the number of entries in the list
as it jumps down to the next row as long as the next row is not blank?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default using a variable length list to poplate a List Box

'You can use a variable to identify the last row of the range. Assume that
your RowSource or ListFillRange is in Column A:

lasrRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row

'Then Set an object variable to represent the dynamic range:

Set myRowSrc = ActiveSheet.Range("A2: A" 7 lastRow)

'To use this effectively, you would need to place the Set statement in the
code so that if your range is changed using a loop, the Set statement will
re-initialize on each iteration of the loop. Otherwise, it would be the
same as assigning a static range for RowSource.


"RocketRod" wrote in message
...
I have a spreadsheet with a list of values which can be modified by others
with extra entries.
I need to populate t a List Box with all the entries taking into account
how
many there are now in the list.
Is there a way to automatically set/update the number of entries in the
list
as it jumps down to the next row as long as the next row is not blank?



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
Transpose a variable length list [email protected] Excel Programming 3 December 5th 08 02:39 AM
Transpose a variable length list into Excel / Access Table Pete New Users to Excel 11 September 13th 06 07:37 PM
Create Variable Length String Dependent Upon Size List ags5406 Excel Programming 1 May 28th 06 11:30 PM
Filling combobox with variable length list Denny Behnfeldt Excel Programming 3 January 2nd 05 06:31 PM
how to? running average from a variable length list robreeve Excel Programming 1 July 28th 03 02:05 PM


All times are GMT +1. The time now is 12:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"