+ Reply to Thread
Results 1 to 2 of 2

Copy paste to new workbook if new wb exists

  1. #1
    Registered User
    Join Date
    03-09-2016
    Location
    Rotterdam
    MS-Off Ver
    2016
    Posts
    28

    Copy paste to new workbook if new wb exists

    Hi everyone,

    Im running into the following:
    I try to copy and paste an output from workbook x to a new workbook y. If workbook y does not exist, the code should create a new workbook and perform the copy and paste routine. This worked but suddenly Im getting an automation error. Further, in case the workbook does exist the copy and paste routine does not work either. Can someone help me out here?

    Please Login or Register  to view this content.
    Last edited by prinsr; 02-20-2019 at 11:05 AM.

  2. #2
    Registered User
    Join Date
    03-09-2016
    Location
    Rotterdam
    MS-Off Ver
    2016
    Posts
    28

    Re: Copy paste to new workbook if new wb exists

    I think I solved it. I missed a name and a workbooks.open statement. Here is the final code.
    Still interest in suggestions to improve it!
    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. HOW CHECK FILE.NAME HAS EXISTS OR NOT IN FOLDER,if not exists then copy
    By daboho in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2018, 03:50 AM
  2. Copy and paste to new worksheet but overwrite if data already exists.
    By digimon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2015, 11:17 PM
  3. Replies: 9
    Last Post: 12-19-2014, 11:12 PM
  4. [SOLVED] Pop-up message box if a empty cell exists before copy & paste
    By XxCMoneyxX in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-09-2013, 11:49 AM
  5. Replies: 4
    Last Post: 10-25-2012, 05:09 PM
  6. Copy and paste non consecutive cells and paste consecutively in another workbook
    By macquhele in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-12-2011, 02:36 PM
  7. Copy and paste value if it exists.
    By glocker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2009, 08:35 PM

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