Results 1 to 2 of 2

Run time Error 1004: Copy method of Worksheet Class failed

Threaded View

  1. #1
    Registered User
    Join Date
    09-24-2013
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2007
    Posts
    8

    Run time Error 1004: Copy method of Worksheet Class failed

    Hey guys,

    Im using Excel 2013 and I'm getting an issue in vba I can't figure out. (This is something I've done several dozen time before) But everytime I try to copy a sheet in a workbook,
    Sheets("Sheet1").Copy After:=WB.Sheets(WB.Sheets.Count)
    I recently copied in this sheet from another workbook, and deleted all of it's formula names, but I can't copy any other sheets now either.
    the Run time Error 1004: Copy method of Worksheet Class failed pops up. What is weird is that I put in a msgbox and
    MsgBox (WB.Sheets.Count)
    returns a "1" though the sheet has about a dozen sheets within it. Anything I'm missing? Ive saved the workbook and even saved it as another name.

    Update: So it looks like I have a very hidden sheet in my WB for some weird reason, I'll be trying to remove that (it won't let me currently) and see if it works

    Update: Deleted the very hidden sheet but the error is still showing up, the sheet I imported has a sheet number of 77 while the previous last sheet was 23, could this be a cause?

    Update: Fixed, it looks like when I was setting WB = thisworkbook and a few other methods it was refering to my Personal workbook. I changed it to activeworkbook and its working now. No clue why it did that. Any thoughts?
    Last edited by jamaal09; 05-17-2014 at 08:44 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Getting Run-Time error '1004': Paste method of Worksheet class failed
    By randomguy1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2013, 10:47 PM
  2. [SOLVED] Run-time error 1004 paste method of worksheet class failed
    By Castillb in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-12-2013, 02:24 PM
  3. Run time error 1004 select method of worksheet class failed
    By ayvee0 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-14-2013, 10:12 AM
  4. Excel Run time Error 1004: Copy method of Worksheet Class failed
    By chrismann85 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-30-2008, 06:05 AM
  5. [SOLVED] Run Time Error 1004 Copy method of Worksheet class failed
    By Paul Hitchcock in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-04-2005, 04:06 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