Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBoxes - RowSource
I am trying to find a way to use a filtered range as the Rowsource for a
listbox I hoped to use AutoFilter to provide the data but it doesn't seem appropriate. Will I have to copy the filtered data to another area on the worksheet ? .... or is there a better way to achieve the desired result ? Regards & TIA |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBoxes - RowSource
Hi
You can also fill your listboxes with code and loop through the visible cells in the range For Each cell In Range("A1:A100").SpecialCells(xlCellTypeVisible) 'your code Next -- Regards Ron de Bruin http://www.rondebruin.nl "SA3214 @Eclipse.co.uk" <sa3214<No Spam wrote in message ... I am trying to find a way to use a filtered range as the Rowsource for a listbox I hoped to use AutoFilter to provide the data but it doesn't seem appropriate. Will I have to copy the filtered data to another area on the worksheet ? ... or is there a better way to achieve the desired result ? Regards & TIA |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBoxes - RowSource
Thanks for the pointer Ron
Not sure what to put in place of 'your code yet ... but I'll give it a try "Ron de Bruin" wrote in message ... Hi You can also fill your listboxes with code and loop through the visible cells in the range For Each cell In Range("A1:A100").SpecialCells(xlCellTypeVisible) 'your code Next -- Regards Ron de Bruin http://www.rondebruin.nl "SA3214 @Eclipse.co.uk" <sa3214<No Spam wrote in message ... I am trying to find a way to use a filtered range as the Rowsource for a listbox I hoped to use AutoFilter to provide the data but it doesn't seem appropriate. Will I have to copy the filtered data to another area on the worksheet ? ... or is there a better way to achieve the desired result ? Regards & TIA |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBoxes - RowSource
Not sure what to put in place of 'your code yet ... but I'll give it a try
If you have a listbox on a userform you can use this event in the userform module Private Sub UserForm_Initialize() Dim cell As Range For Each cell In Range("A1:A100").SpecialCells(xlCellTypeVisible) Me.ListBox1.AddItem cell.Value Next End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "SA3214 @Eclipse.co.uk" <sa3214<No Spam wrote in message ... Thanks for the pointer Ron Not sure what to put in place of 'your code yet ... but I'll give it a try "Ron de Bruin" wrote in message ... Hi You can also fill your listboxes with code and loop through the visible cells in the range For Each cell In Range("A1:A100").SpecialCells(xlCellTypeVisible) 'your code Next -- Regards Ron de Bruin http://www.rondebruin.nl "SA3214 @Eclipse.co.uk" <sa3214<No Spam wrote in message ... I am trying to find a way to use a filtered range as the Rowsource for a listbox I hoped to use AutoFilter to provide the data but it doesn't seem appropriate. Will I have to copy the filtered data to another area on the worksheet ? ... or is there a better way to achieve the desired result ? Regards & TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
help with rowsource | Excel Programming | |||
Dropdown Rowsource | Excel Programming | |||
Using IF, Then with rowsource? | Excel Programming | |||
RowSource Problem | Excel Programming | |||
RowSource in ListBox | Excel Programming |