+ Reply to Thread
Results 1 to 4 of 4

Using cell value in one workbook to find worksheet with same name in another workbook

  1. #1
    Registered User
    Join Date
    11-04-2015
    Location
    Holland, MI
    MS-Off Ver
    2013
    Posts
    3

    Using cell value in one workbook to find worksheet with same name in another workbook

    I am stumped on this problem and I have a feeling it is a simple fix. I am trying to get the following code to work:

    Please Login or Register  to view this content.
    The code is getting hung up at Sheets(strName).Select

    Basically the code is taking data copying data from a table in on workbook and needs to find a worksheet in a different workbook to paste the table information.

    Any help would be greatly appreciated!

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: Using cell value in one workbook to find worksheet with same name in another workbook

    Hi C reg,

    Welcome to the forum!!

    So the value in K3 of the active sheet of the workbook you're running the code from is the exact name of the desired sheet in the RE.xlsm workbook?

    Check it by putting the strName variable in a message box and make sure it exists in RE.xlsm.

    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Registered User
    Join Date
    11-04-2015
    Location
    Holland, MI
    MS-Off Ver
    2013
    Posts
    3

    Re: Using cell value in one workbook to find worksheet with same name in another workbook

    Thanks Trebor! Completely bonehead move on my part. The worksheet had a capital "i" instead of a 1 which is why it was returning error message. Thanks again!

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: Using cell value in one workbook to find worksheet with same name in another workbook

    You're welcome and thanks for marking the thread as solved

    Regards,

    Robert

+ 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] Code to cut cell from one workbook, close same workbook, and paste in different workbook
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 03-13-2014, 04:01 PM
  2. How to find whether a worksheet exists in a workbook (getting frustated really!!!)
    By kgakhar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-08-2013, 12:55 AM
  3. Find workbook name and combine that workbook into exisiting worksheet column
    By ghladik in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2013, 02:23 PM
  4. [SOLVED] Find and open workbook.xls from cell A1 and search for value from A2 in that workbook
    By ANDREWA in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-18-2012, 07:50 PM
  5. Replies: 1
    Last Post: 10-24-2012, 07:46 AM
  6. Search or Find a specific worksheet tab with workbook
    By ilroadrunner in forum Excel General
    Replies: 4
    Last Post: 04-29-2009, 08:55 AM
  7. Find & Replace a link to another worksheet in the same workbook
    By Sidesfive in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-06-2006, 05:30 PM
  8. [SOLVED] Find a value in a workbook and return the worksheet name
    By Craig in forum Excel General
    Replies: 2
    Last Post: 08-10-2005, 05:05 PM

Tags for this Thread

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