+ Reply to Thread
Results 1 to 4 of 4

Display data does not exist when using .FIND

  1. #1
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Display data does not exist when using .FIND

    hi

    my code works well except for one, it doesn't display the message that file doesnt exists when performing search using .find in excel...please correct my coding below. im sorry if i could not attached a sample workbook for this inquiry.

    Please Login or Register  to view this content.
    regards,

    stoey

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Display data does not exist when using .FIND

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Re: Display data does not exist when using .FIND

    hi shg,

    thanks for the quick reply...i tried your suggested coding but once i tried entering the 6 digit employee id, what happens is that on the first digit, the msg prompt "not found" appears immediately...this prompt should appear incase there is no matching employee id that exists within the database...any other ideas?

    regards,

    stoey

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Display data does not exist when using .FIND

    Hello stoey,

    I made a few changes to your macro. I removed the loop that was looking for other occurances of the search text. It isn't needed because either you find one or none. The If Then statements have changed to include the message "Not Found".
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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