+ Reply to Thread
Results 1 to 4 of 4

Find The Same Number on another workbook

  1. #1
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Find The Same Number on another workbook

    Hi,

    I'm trying to Find numbers that are in one col in one workbook that might be in another workbook. Here is the script im trying to use.

    However after it does one pass I get an object variable or with block variable not set.

    Can someone advise what may be wrong?

    Here is my script:

    Thank You, Mike

    Please Login or Register  to view this content.
    Last edited by realniceguy5000; 04-14-2011 at 01:06 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Find The Same Number on another workbook

    Mike
    The loop is working through cells in wb.Sheets(1) and activates once OK - this sheet has the focus
    Then sheet wbAudit gets 'activated' within the loop - this then has the focus
    Shouldn't wb.Sheets(1) get reset to execute the next cycle of the loop?
    barry

  3. #3
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Re: Find The Same Number on another workbook

    Quote Originally Posted by barryleajo View Post
    Mike
    The loop is working through cells in wb.Sheets(1) and activates once OK - this sheet has the focus
    Then sheet wbAudit gets 'activated' within the loop - this then has the focus
    Shouldn't wb.Sheets(1) get reset to execute the next cycle of the loop?
    barry
    Well the loop worked fine as when I step through it A is a new number, I did change the script to this and now it's working.

    Thank You, Mike

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Find The Same Number on another workbook

    Well done Mike
    Glad you're sorted
    barry

+ 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