+ Reply to Thread
Results 1 to 2 of 2

Run Time Error -'1004' - while copying data between workbooks

  1. #1
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    Run Time Error -'1004' - while copying data between workbooks

    Hi All,

    Requesting your help for this simple macro.

    I have below two files kept open

    1st file - Report for RVC 26.04.2014.xlsm ( source file Data needs to be copied )
    2nd file - RVC Template .xlsm ( Destination file where data needs to be pasted )

    Below code is executed.

    HTML Code: 
    But i am facing error
    "Run Time Error - '1004'
    Application - Defined or Object defined error"

    Please help me in fixing this and also help me in shorten this code effectively.
    Last edited by prabhuduraraj09; 04-26-2014 at 02:39 AM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Run Time Error -'1004' - while copying data between workbooks

    Hi, prabhuduraraj09,

    if you build a range on several cells make sure that they all rely to the same workbook and worksheet otherwise the active sheet is referenced. And if you turn off Application events make sure that at the end of the macro you turn these on again.

    Give this code a try (untested):
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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] run-time error '1004' method 'open' of object 'workbooks' failed
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-03-2016, 06:24 PM
  2. Runtime error 1004 when copying & pasting data to another sheet
    By luneke1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2014, 06:04 PM
  3. [SOLVED] Runtime Error 1004 when Copying worksheets from multiple workbooks into current workbook
    By dharris42 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2013, 11:56 AM
  4. [SOLVED] Run Time Error 1004 when copying data
    By Sharksfan88 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-08-2012, 06:45 AM
  5. Copying worksheets via VBA causes run-time error 1004
    By neilshaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-23-2011, 06:15 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