+ Reply to Thread
Results 1 to 6 of 6

Copying a worksheet from a different workbook without using the clipboard - values only

  1. #1
    Registered User
    Join Date
    04-13-2012
    Location
    Tauranga, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    15

    Copying a worksheet from a different workbook without using the clipboard - values only

    Can anybody please let me know if it is possible to...

    Copy a worksheet from a different workbook to a worksheet in the current workbook, without using the clipboard, and by copying values only, and doing it with only one line of code please.

    So far I am using this, but it copies formatting as well, which I do not want.

    Please Login or Register  to view this content.
    I can remove the formatting with extra lines of code, but would like to know if it is possible with just a single instruction.

    Thank you

  2. #2
    Forum Contributor
    Join Date
    12-05-2015
    Location
    Akron, OH
    MS-Off Ver
    15.0
    Posts
    424

    Re: Copying a worksheet from a different workbook without using the clipboard - values onl

    Can't you do the following?

    Set WBD.WSD = WBS.WSS

    Or

    Set WSD = WSS
    ?
    <---If my answer helped, please click *

  3. #3
    Forum Contributor
    Join Date
    12-05-2015
    Location
    Akron, OH
    MS-Off Ver
    15.0
    Posts
    424

    Re: Copying a worksheet from a different workbook without using the clipboard - values onl

    Else, I wonder if you can activate the source worksheet, store the worksheet in a collection, and then activate the destination workbook, create a new worksheet, and copy the worksheet contained in the collection to the destination worksheet using a Set method.

    Never tried either method and I'm away from my computer right now but please let me know if either this way or something in my last post worked.

    I can provide code tomorrow if you aren't familiar with collections.

    Joe

  4. #4
    Registered User
    Join Date
    04-13-2012
    Location
    Tauranga, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Copying a worksheet from a different workbook without using the clipboard - values onl

    No, it does not work.

    I have decided to use this.

    Please Login or Register  to view this content.
    It stops the numbers being copied over as text, just does not do it in one line.

    Good enough.

    Thanks anyway.

  5. #5
    Forum Contributor
    Join Date
    12-05-2015
    Location
    Akron, OH
    MS-Off Ver
    15.0
    Posts
    424

    Re: Copying a worksheet from a different workbook without using the clipboard - values onl

    See the following for a solution: http://www.excelforum.com/excel-prog...rng-cells.html

  6. #6
    Forum Contributor
    Join Date
    12-05-2015
    Location
    Akron, OH
    MS-Off Ver
    15.0
    Posts
    424

    Re: Copying a worksheet from a different workbook without using the clipboard - values onl

    You basically need a structure like this, but it could be problematic when dealing with extremely large data sets

    Please Login or Register  to view this content.

+ 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] Copying a worksheet from a workbook and save it as a new worksheet based on a list. VBA
    By malitec in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-05-2015, 03:07 AM
  2. Copying Rows to clipboard from a range if they have values
    By MikeDC85 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-04-2014, 08:42 AM
  3. Replies: 2
    Last Post: 05-01-2013, 06:17 AM
  4. [SOLVED] Copying worksheet from another open workbook using variables, paste to active workbook
    By sanpedro_nz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-08-2012, 08:25 AM
  5. Copying filtered data from one worksheet to a worksheet in another workbook
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-27-2011, 09:13 AM
  6. Copying named worksheet from a workbook to a new workbook
    By s999 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-16-2010, 01:09 PM
  7. Copying A Worksheet From Each Open Workbook to an new Workbook
    By carl in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-03-2006, 01:40 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