+ Reply to Thread
Results 1 to 9 of 9

Debug Error when trying Search values that are non-existing in the Database

  1. #1
    Registered User
    Join Date
    05-21-2020
    Location
    Manila, Philippines
    MS-Off Ver
    Office 365
    Posts
    25

    Debug Error when trying Search values that are non-existing in the Database

    So I have this View/Edit function on my sheet and it works fine when searching for values that exists. However, I dont know how to formulate the script for searching a non-existing value in the database. It gives me a Debug Error.

    I am really not an excel wizard and been following some youtube tutorials only to finally come up with this. Some came from this forums also.

    Hopefully, I can get some more assistance on this to get fully functional.
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Debug Error when trying Search values that are non-existing in the Database

    In general. You'd want to have Error Handling in code.

    Ex:
    Please Login or Register  to view this content.
    Edit: You can read more comprehensive article written by Chip Pearson on the subject.
    http://www.cpearson.com/Excel/ErrorHandling.htm
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Debug Error when trying Search values that are non-existing in the Database

    You can amend your code a little to check if that search # exists or not

    Please Login or Register  to view this content.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  4. #4
    Registered User
    Join Date
    05-21-2020
    Location
    Manila, Philippines
    MS-Off Ver
    Office 365
    Posts
    25

    Re: Debug Error when trying Search values that are non-existing in the Database

    This is perfect Sir. A lot of thanks you. I do promise to better have a clear understanding of formulas specially trying to create them. Thats where my weakness is. I am really a newbie in this.

    More power to you sir. And please do stay safe.

    Cheers.

  5. #5
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Debug Error when trying Search values that are non-existing in the Database

    Glad to help & thanks for the reps

  6. #6
    Registered User
    Join Date
    05-21-2020
    Location
    Manila, Philippines
    MS-Off Ver
    Office 365
    Posts
    25

    Re: Debug Error when trying Search values that are non-existing in the Database

    You totally deserve it sir. I am currently working on a vlookup function on the same sheet. But before even asking, I will try to discover it myself first. :-)

  7. #7
    Registered User
    Join Date
    05-21-2020
    Location
    Manila, Philippines
    MS-Off Ver
    Office 365
    Posts
    25

    Re: Debug Error when trying Search values that are non-existing in the Database

    Hi Sir,

    Just a follow up on this. I have been also trying to have the mouse wheel work not sure what to do.

    Maybe you can help on it too?

    Thanks

  8. #8
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Debug Error when trying Search values that are non-existing in the Database

    If you mean mouse scroll in the UserForm, I don't know how to do that I did a quick search & it doesn't seems easy either. I found some people referring to this LINK which they say it works, if interested.

  9. #9
    Registered User
    Join Date
    05-21-2020
    Location
    Manila, Philippines
    MS-Off Ver
    Office 365
    Posts
    25

    Re: Debug Error when trying Search values that are non-existing in the Database

    Hehehe. its ok sir. I saw some few links too but I do not understand how to implement it or even where to put it. LOL

+ 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. [SOLVED] search database using checkbox value as filters and return values in listbox
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2017, 11:27 AM
  2. [SOLVED] Search for values, copy matching rows to existing sheet in a specific place?
    By sordosxls in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-12-2016, 06:27 PM
  3. [SOLVED] creating a database from existing database by user choice
    By almostgenius in forum Excel General
    Replies: 5
    Last Post: 05-29-2015, 05:29 PM
  4. Replies: 2
    Last Post: 10-22-2014, 11:32 PM
  5. VBA Code Runs in Debug Mode But Returns Type Mismatch Error Outside Debug Mode
    By valerie.k.chiang in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2014, 03:48 PM
  6. Search/List Box (Userform) cannot find existing Date value in the database
    By archerrc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2013, 04:57 PM
  7. Help amending existing marco for a criteria search on a database
    By howardjo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2008, 07:01 AM

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