+ Reply to Thread
Results 1 to 8 of 8

Copying between workbooks not working

  1. #1
    Registered User
    Join Date
    05-26-2019
    Location
    UK
    MS-Off Ver
    2016
    Posts
    50

    Copying between workbooks not working

    Hi, could you please kindly explain as to why the first line of code works fine and the second one doesn't (Type mismatch- Error13)?
    Please note that 'testsheet' is the name I gave to a specific tab (like Sheet1 for example). It must work like that due to the actual visible sheet name potentially changing.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Many thanks!
    Last edited by Frenzyy; 05-07-2020 at 08:14 AM.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    10,624

    Re: Copying between workbooks not working

    Is testsheet a variable?
    If so how have you declared it & assigned a value to it?

  3. #3
    Registered User
    Join Date
    05-26-2019
    Location
    UK
    MS-Off Ver
    2016
    Posts
    50

    Re: Copying between workbooks not working

    It's not and I haven't, though I have tried.
    Just to make sure that we are clear on what I'm trying to refer to with 'testsheet'- think about it as if this was the 'Sheet1' set by default in the background. Hope you understand what I mean.
    Thanks!

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    10,624

    Re: Copying between workbooks not working

    Do you mean the sheet codename?
    Where you have change the word infront of the brackets?
    Attached Images Attached Images

  5. #5
    Registered User
    Join Date
    05-26-2019
    Location
    UK
    MS-Off Ver
    2016
    Posts
    50

    Re: Copying between workbooks not working

    Yes, exactly. Sorry about that, couldn't think of the exact name.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    10,624

    Re: Copying between workbooks not working

    In that case you would use
    Please Login or Register  to view this content.
    But this will only work if testsheet is in the same workbook as the code.

  7. #7
    Registered User
    Join Date
    05-26-2019
    Location
    UK
    MS-Off Ver
    2016
    Posts
    50

    Re: Copying between workbooks not working

    Works great, thank you very much.

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    10,624

    Re: Copying between workbooks not working

    You're welcome & thanks for the feedback.

+ 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. Replies: 1
    Last Post: 10-10-2012, 10:23 AM
  2. Replies: 2
    Last Post: 08-17-2012, 08:16 AM
  3. Copying Various Worksheets From Different Workbooks Into New Workbooks
    By Panda2000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2012, 09:06 PM
  4. copying Workbooks...
    By NotExcelSavvy in forum Excel General
    Replies: 2
    Last Post: 05-07-2008, 07:01 PM
  5. Copying from other Workbooks
    By SusieQ in forum Excel General
    Replies: 0
    Last Post: 01-30-2006, 08:44 AM
  6. [SOLVED] Copying between Workbooks
    By Stuart in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-02-2005, 06:20 PM
  7. Copying between Workbooks
    By Stuart in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-02-2005, 06:17 PM
  8. need help for copying among workbooks
    By snow in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2005, 09:07 AM

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