+ Reply to Thread
Results 1 to 7 of 7

Paste to new work book

  1. #1
    Forum Contributor
    Join Date
    08-31-2007
    MS-Off Ver
    2010
    Posts
    130

    Paste to new work book

    I am trying to paste a sheet from one workbook into another workbook.
    Im not getting any errors but it is not pasting anything either.

    Please Login or Register  to view this content.
    Last edited by zbor; 05-19-2014 at 06:35 AM.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,938

    Re: Paste to new work book

    You're not copying the correct thing - the cells:

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Contributor
    Join Date
    08-31-2007
    MS-Off Ver
    2010
    Posts
    130

    Re: Paste to new work book

    Bernie Deitrick

    It HiLites "TrueSheets" and gives me an error "Sub or Fuction not defined"

  4. #4
    Forum Contributor
    Join Date
    08-31-2007
    MS-Off Ver
    2010
    Posts
    130

    Re: Paste to new work book

    I get a "Subscript out of range" error after I enter the path and name.

  5. #5
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,938

    Re: Paste to new work book

    If your workbook is open, then you do not include the path, just the file name - hence the Workbooks("Book3.xlsm"). You need to match what the file name you are using.

    If your workbook is not open then you need to open it first, but your code did not show that.

    Not sure what you meant by "TrueSheets" - that is not part of my code. My code works (without error) when I have two workbooks open, each with a sheet named "Sheet2" and one of the books named Book3.xlsm.

  6. #6
    Forum Contributor
    Join Date
    08-31-2007
    MS-Off Ver
    2010
    Posts
    130

    Re: Paste to new work book

    I tried to edit my post but it did not take.
    The TrueSheets was my mistake.
    My copy paste placed it at the end of the line above which ended with True, When I pasted your code it made it TrueSheets.
    I saw it after I sent off my reply.
    Sorry but also thank you for your help.

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Paste to new work book

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Copy and paste values from one work book to another workbook
    By TheAnswer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2010, 02:57 AM
  2. Replies: 5
    Last Post: 06-15-2010, 09:52 AM
  3. Replies: 2
    Last Post: 05-30-2006, 02:59 PM
  4. [SOLVED] I wish automate a cut and paste of data from one work book to ano
    By Ian Anderson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-28-2006, 03:35 AM
  5. Replies: 3
    Last Post: 09-01-2005, 04:05 AM

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