LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Filtered List as Listbox RowSource

G'day there once again, One & All,

I'm currently trying to finish off a userform which has a
multicolumn ListBox that has a dynamic range as a rowsource. I've
managed to get most of it working the way I want it too, my columns
display as intended, and sort themselves according to selections made
via optionbuttons. I even have a sort option for ascending & descending
order.

What I want to do is give my users the option of displaying data
that only belongs to a user defined category. Eg, click the "OSA" option
button and the listbox will display only those employees who are paid
Operational Shift Allowance, etc.

I tried several variations of Autofilter before looking on the net
& finding that filtering the list has no effect (something I'd already
seen for myself). I then had a few goes at using combinations of
range.rows.hidden, and another method I can't recall at the moment, but
which had a criteria of xlcelltype = visible.

Having no success there, I tried copying the visible data from my
range, and then pasting it to a different location. The problem then was
that I couldn't (and still can't) reset the ListBox's rowsource range.
It gives me a 1004 error when I try to point it at the copied/pasted
data.

I've not tried the .additem method because I've set the rowsource
earlier in the code and "Help" tells me that I can't use it when the
rowsource is assigned.

I've no doubt this has occurred previously and there has to be a
workaround, but I can't find it. Google searches with various criteria
bring me plenty of hits, but nothing that I've found useful so far.

Can any one please offer advice, or a site or reference that might
explain house it's done?

Thank you once again,
--
Ken McLennan
Qld, Australia
 
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
Listbox rowsource on Userform Wendy Excel Discussion (Misc queries) 6 February 28th 08 05:46 PM
???Help??? Userform.Listbox.rowsource = ??? Steve Sparti Excel Discussion (Misc queries) 0 March 1st 06 09:44 PM
RowSource in ListBox aet-inc[_2_] Excel Programming 1 December 3rd 03 12:41 AM
Is refreshing listbox rowsource in listbox click event possible? Jeremy Gollehon[_2_] Excel Programming 4 September 25th 03 06:45 PM
listbox rowsource Christy[_2_] Excel Programming 4 September 20th 03 11:44 PM


All times are GMT +1. The time now is 10:40 AM.

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"