+ Reply to Thread
Results 1 to 3 of 3

How to write code to search for a desired string in external independent excels files

  1. #1
    Registered User
    Join Date
    03-15-2007
    Posts
    2

    How to write code to search for a desired string in external independent excels files

    I want to have a command button in an independent excel worksheet which will execute a macro which in turn would search for a particular text string such as “Error” within a selection of independent excel files residing in a local directory such as C:\ and return a Pass/Fail value when it finds such a string in the collection of excel files.

    Example:
    Command button Cmd_1 in “Sheet1” of an excel sheet (template) will fire a macro to search for a text string such as “Error” in two independent files (Data1.xls, Data2.xls) and return True/False depending upon whether the string “Error” is found in either of them.

    How do I come up with a code for the above? What search functions could I use?

    Thanks

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Please read this sites posting rules - links below

    Your other thread has been deleted
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525
    This post shows how to open a workbook in a particular folder perform an action then close the workbook

    http://www.excelforum.com/showthread.php?t=589590

    What are the ranges for the search??

+ 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