+ Reply to Thread
Results 1 to 4 of 4

VBA: Creating listbox similar to the one in Pivot table (Listbox+Checkbox)

  1. #1
    Registered User
    Join Date
    08-17-2005
    Posts
    7

    VBA: Creating listbox similar to the one in Pivot table (Listbox+Checkbox)

    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

  2. #2
    Summer
    Guest

    RE: 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
    >
    >


  3. #3
    Stephen Bullen
    Guest

    Re: VBA: Creating listbox similar to the one in Pivot table (Listbox+Checkbox)

    Hi Modjoe23,

    Just use a regular list box, with MultiSelect set to true. There is a
    property to make it show check boxes, but I've never been impressed by
    it.

    Regards

    Stephen Bullen
    Microsoft MVP - Excel

    Professional Excel Development
    The most advanced Excel VBA book available
    www.oaltd.co.uk/ProExcelDev



  4. #4
    Registered User
    Join Date
    08-17-2005
    Posts
    7

    Thank you

    I wasn't aware that it was that simple, sorry and thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1