View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
summer summer is offline
external usenet poster
 
Posts: 13
Default VBA: Creating listbox similar to the one in Pivot table (Listbox+C

ModJoe:

If I understood you correctly, what you want to do is 'Auto
Filter', which is a very simple task. Here's what you'll need to do:

If your spreadsheet is organized as a list, simply click a cell in list. /
If not, highlight a single cell or row containing your column headers.

Next, on the standard toolbar, click 'Data' - 'Filter' - 'Autofilter'...and
you're done! You'll notice each of your column headers now has a 'list box'
look with all entires selected by default. The list may be sorted by blank,
non-blank, custom, top 10, or any one or all of the entries.

If at any time you decide you want to turn off the Auto Filter, simply click
'Data' - 'Filter' - 'Auto Filter' to remove the check mark.

I hope this is what you're looking for. Much simpler than adding controls.
Let me know if you have questions. :)

"modjoe23" wrote:


Hi,

I would like to create a listbox that looks and functions exactly like
the ones in the Pivot tables where by default all are selected or user
can choose as many as they want. Is there a control for me to do this
(listbox + checkbox) or should I use a regular listbox?

Thanks,
Joe


--
modjoe23
------------------------------------------------------------------------
modjoe23's Profile: http://www.excelforum.com/member.php...o&userid=26376
View this thread: http://www.excelforum.com/showthread...hreadid=396510