+ Reply to Thread
Results 1 to 4 of 4

Copying a sheet into same workbook - runtime error 1004.

  1. #1
    Registered User
    Join Date
    02-10-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    58

    Copying a sheet into same workbook - runtime error 1004.

    Hello.

    I've written a code to create a duplicate of a pre-made sheet into the same workbook. It worked for a while but now it's giving me runtime error 1004 saying that "Copy method of Worksheet class failed". I'm not sure how to remedy this.

    My code is this:

    Please Login or Register  to view this content.
    Last edited by russwongg; 02-03-2017 at 02:42 AM. Reason: Solved

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Copying a sheet into same workbook - runtime error 1004.

    .
    Your macro works here.

    Sometimes a workbook can get corrupted (for no good reason).

    Simple remedy is to type the macro into a new workbook and start fresh.

    If that is not an option, there are VBA macros and freeware online you might try to repair your workbook.

    You could search for " excel repair corrupted workbook "

  3. #3
    Registered User
    Join Date
    02-10-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    58

    Re: Copying a sheet into same workbook - runtime error 1004.

    Thanks! This works . I never knew it could get corrupted like that.

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Copying a sheet into same workbook - runtime error 1004.

    Wonderful !

    Thanks for the Add Rep
    Last edited by Logit; 02-03-2017 at 01:34 PM.

+ 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] Runtime Error '1004' when Copying Charts
    By JayRab in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-02-2020, 07:07 AM
  2. [SOLVED] Runtime error 1004 range of object with VBA code for copying all worksheets to word
    By vtcin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-24-2014, 07:15 AM
  3. 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
  4. Runtime 1004 Error when copying
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-03-2013, 09:51 AM
  5. Runtime Error 1004 while copying dinamic ranges
    By mallok in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-29-2013, 09:37 AM
  6. [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
  7. Copy sheet from another workbook - runtime error 1004
    By larne in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2010, 05:45 AM

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