+ Reply to Thread
Results 1 to 5 of 5

VBA search error

  1. #1
    Registered User
    Join Date
    10-08-2017
    Location
    Belgium
    MS-Off Ver
    2013
    Posts
    1

    VBA search error

    Hi,

    This code is ok for a search with 800 rows in a sheet in excel. But if the database grown to 2000 rows, it doesn't work

    Can you help me ?

    Problem with the cache capacity ?

    Thanks

    Please Login or Register  to view this content.
    Last edited by jeffreybrown; 10-08-2017 at 02:31 PM. Reason: Please use code tags!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: VBA search error

    How does it not work?

    By the way, I doubt very much is anything to do with cache/memory.
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: VBA search error

    Is the range "Liste" big enough? maybe it is between 2000 and 800 rows.
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: VBA search error

    Also AddItem is probably the worst method to use when filling a listbox with that kind of range.
    I would recommend using either Advanced Filter or Filter in Listbox.
    If possible post example file so we have something to work with.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA search error

    Hi nemisius

    Welcome to the Forum!!!

    I'd assume from your posted Code Range Liste is a Named Range. I'd assume further that it's not Dynamic such that it grows as you add items to the Named Range.

    If my assumption is correct try redefining your Named Range Liste to something like this...

    With Header...
    Please Login or Register  to view this content.
    Without Header...
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Error message when trying to search
    By dfw4lgz in forum Excel General
    Replies: 6
    Last Post: 07-19-2016, 05:52 PM
  2. Find or search error
    By capngene in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2012, 12:38 AM
  3. Error 400 - Search and Replace
    By alokie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-07-2011, 07:41 PM
  4. Error 400 - Search and Replace
    By alokie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-07-2011, 06:58 PM
  5. Error in Search function
    By VishalGupta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-04-2011, 02:59 AM
  6. Error handling in a search
    By michaelberrier in forum Excel General
    Replies: 2
    Last Post: 05-21-2006, 02:10 PM
  7. The search key was not found error
    By Nydia in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 04-27-2005, 11:06 AM

Tags for this Thread

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