+ Reply to Thread
Results 1 to 3 of 3

Copying data from a closed workbook to an open one

  1. #1
    Registered User
    Join Date
    08-06-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2007
    Posts
    5

    Copying data from a closed workbook to an open one

    Greetings,

    I'm trying to copy data from one workbook that populates via DDE. This is a subprocedure that is called to from another subprocedure that contains a timer to allow the data to populate. The workbook that has the DDE data has a static filename, but the target workbook that I want to paste the data in does not and changes with date every day. Because of this, I have not given variable names to the workbooks. I tried a number of different things such as a with statement and a couple of different ways to trick the new file into pasting the values. I'm getting a runtime error on my code PasteSpecial method of Range class failed. I'm unsure of what exactly is going on. It seems as though I'm not copying anything even though I've told it to do so in the code. Any assistance in getting it to paste the way I'm hoping for would be greatly appreciated.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Copying data from a closed workbook to an open one

    Try this...

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    08-06-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Copying data from a closed workbook to an open one

    Worked like a charm. Thanks AlphaFrog!

+ 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 data from a closed workbook into an open workbook ignoring excel filter?
    By reach78 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 09-17-2013, 12:31 AM
  2. Copying Data From Closed Workbook
    By ukhellfire in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-20-2013, 09:49 AM
  3. [SOLVED] Copying specific rows from an open workbook into the next row of a closed workbook.
    By Deimola in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-05-2012, 12:59 PM
  4. Copying Data From Closed Workbook
    By praetorianprefect in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-29-2011, 02:15 AM
  5. VBA Copying data on closed sheet to open Workbook.
    By Mase123y in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-20-2009, 12:21 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