+ Reply to Thread
Results 1 to 6 of 6

Find Text String across Multiple Workbooks

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    Taunton, England
    MS-Off Ver
    Excel 2003 Office, Excel 2010 Home
    Posts
    13

    Find Text String across Multiple Workbooks

    Hi All,

    After much searching for the VBA to answer my Thread Title I cannot find exactly what I need.

    The Scenario:

    Have a Workbook with one sheet and at Cell A2 input a search String....select a CommandButton and it will open up each File in a particular folder, search for the string and if not found close it without Saving but if it does find the string, macro stops at the cell where found and a MessageBox pops up stating as example "Search Complete - Account Found".

    Also if the string is not found in any of the Workbooks a MessageBox returns "Account Not Found - Check The Account ID" - this will prompt user to check their typing for errors.

    Code I have for Opening each Workbook is:
    Please Login or Register  to view this content.
    Can anyone help me fill in the missing code?

    Yours in Anticipation

    Craig

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Find Text String across Multiple Workbooks

    try:
    Please Login or Register  to view this content.
    Last edited by tehneXus; 05-29-2013 at 06:53 AM.
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  3. #3
    Registered User
    Join Date
    01-25-2013
    Location
    Taunton, England
    MS-Off Ver
    Excel 2003 Office, Excel 2010 Home
    Posts
    13

    Re: Find Text String across Multiple Workbooks

    Hi tehneXus,

    Thanks for quick response.

    I am getting a Run-time error '438' object doesn't support property or method at this line:

    For Each xlWs In wbkTemp

    Any Ideas?

    Craig

  4. #4
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Find Text String across Multiple Workbooks

    aaaah, yes
    should be:
    Please Login or Register  to view this content.
    that happens when I do not test the code I am posting...

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Find Text String across Multiple Workbooks

    Please Login or Register  to view this content.
    TYPO =looat

  6. #6
    Registered User
    Join Date
    01-25-2013
    Location
    Taunton, England
    MS-Off Ver
    Excel 2003 Office, Excel 2010 Home
    Posts
    13

    Re: Find Text String across Multiple Workbooks

    Hi tehneXus,

    Thanks...amendment put in and ran a couple of testers and all working brilliantly...Many Thanks.

    AB33: Spotted typo, but thanks for bringing my attention to it as could have missed it.

    Kind Regards

    Craig

+ 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