+ Reply to Thread
Results 1 to 5 of 5

Show all data in spreadsheet via listview (VBA)

  1. #1
    Registered User
    Join Date
    03-08-2011
    Location
    lancs
    MS-Off Ver
    Excel 2007
    Posts
    6

    Show all data in spreadsheet via listview (VBA)

    Hi i have a search facility on a userform that when you specify a column to search in and type part of a word into a text box it will bring up all the records in the spreadsheet that relate to the search via the list view.

    However i want to be able to click a button to show all records in the spreadsheet in the list view.
    this is my code for the search facilty.


    Please Login or Register  to view this content.
    Thanks in advance

    L
    Last edited by martinl4; 03-11-2011 at 11:00 AM. Reason: SELF RESOLVED

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Show all data in spreadsheet via listview (VBA)

    Why are you using the ListView Control, I would think the ListBox would be sufficient & easier to code
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    03-08-2011
    Location
    lancs
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Show all data in spreadsheet via listview (VBA)

    Will a list box show the headings of each column?

    How would i start to code this?


    I just thought seeing as i have used a listview already it would be easier to use that instead of starting over.

    Regards

    L

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Show all data in spreadsheet via listview (VBA)

    You can show headings in a ListBox & I think you would find coding it simpler.

    Attach an example workbook so that we can se what you have so far
    Last edited by royUK; 03-11-2011 at 03:50 PM.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: Show all data in spreadsheet via listview (VBA)

    listbox heading will only be present if you populate from a range reference.

    You code uses .additem and appears to be finding specific items to add.
    Cheers
    Andy
    www.andypope.info

+ 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