+ Reply to Thread
Results 1 to 6 of 6

Pasting Issues Between Workbooks

  1. #1
    Registered User
    Join Date
    06-18-2014
    Location
    Whatcom, Washington
    MS-Off Ver
    2010
    Posts
    7

    Pasting Issues Between Workbooks

    Oy.

    New poster here, moderate VBA user. Begging for some help with a project that has had me stumped for the last 48 hours.

    What I am attempting to do:

    When closing a Workbook (named "CIR") I would like the data on the "DATA" tab to be cut and then pasted to another Workbook ("CIR Master") in the first blank row. Code posted below goes well until the last line.

    The Issue:

    Rather than pasting to the target Workbook ("CIR Master"), the code below pastes to the source workbook. I have tried many different ways of pasting, but no joy.

    Any help would be greatly appreciated.

    A second question...any ideas on what code could be used to see if the target Workbook is open? (ie, whether it would open as "read-only".)

    Please Login or Register  to view this content.
    Last edited by OwlChutney; 06-19-2014 at 05:18 PM. Reason: Typo

  2. #2
    Registered User
    Join Date
    06-18-2014
    Location
    Whatcom, Washington
    MS-Off Ver
    2010
    Posts
    7

    Re: Pasting Issues Between Workbooks

    ...and I am fully aware that I have likely missed something obvious. Please be gentle?

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Pasting Issues Between Workbooks

    Does each workbook have only one sheet?

  4. #4
    Registered User
    Join Date
    06-18-2014
    Location
    Whatcom, Washington
    MS-Off Ver
    2010
    Posts
    7

    Re: Pasting Issues Between Workbooks

    The target workbook has just one worksheet. The source has multiple sheets, but the code takes me to the worksheet I wish to copy ("DATA") without problem.

    Thanks for the quick reply!

  5. #5
    Registered User
    Join Date
    06-18-2014
    Location
    Whatcom, Washington
    MS-Off Ver
    2010
    Posts
    7

    Re: Pasting Issues Between Workbooks

    Tried using the following to replace the final line of code (Activesheet.Paste):

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.
    Both give me a "Run-time error '1004': Application-defined or object-defined error"

    Looking into work arounds. Any thoughts?

  6. #6
    Registered User
    Join Date
    06-18-2014
    Location
    Whatcom, Washington
    MS-Off Ver
    2010
    Posts
    7

    Re: Pasting Issues Between Workbooks

    Solution has been found!

    The code below resides on the SOURCE spreadsheet:

    Please Login or Register  to view this content.
    This checks to see if the Target Workbook is open, copies from the Source Workbook...and then calls the following code - pastedata() - from the Target:

    Please Login or Register  to view this content.
    Hoping this may be able to help someone else out in the future.

    Peace.

+ 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 pasting issues with mouse connected
    By kas106 in forum Excel General
    Replies: 2
    Last Post: 04-11-2012, 04:52 AM
  2. Pasting issues
    By NH Dan in forum Excel General
    Replies: 4
    Last Post: 08-26-2011, 08:15 AM
  3. Issues with Pasting Cells
    By sarahwilson1000 in forum Excel General
    Replies: 0
    Last Post: 06-22-2011, 02:13 PM
  4. Various pasting issues
    By AnthonyWB in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-31-2011, 12:51 PM
  5. Pasting Personality issues
    By BBFB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-16-2005, 01: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