Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 440435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:52:22+00:00 2026-05-12T20:52:22+00:00

In my workbook, I copy the current sheet to keep as a record of

  • 0

In my workbook, I copy the current sheet to keep as a record of a sale. Eventually, the workbook fills up with sales and at some point throws an error when I try to copy another sheet. After saving, then completely exiting Excel, then reloading the file, I can continue without problems. I’m guessing it’s a memory issue, but I’m not quite sure how to solve it without restarting Excel. I can’t remember the wording of the error exactly, but it went along the lines of “Copy method of worksheet failed”. FWIW I use “Application.CutCopyMode = False” at the end of the macro that copies the sheet.

1st edit:
I’d like to post all of the code, but there’s just so much of it (mostly not related to updating values, input verification, etc. etc.); if I post everything, I’d have to post all of the other functions for it to make sense. Suffice it to say, here’s what I think is applicable:

ActiveSheet.Copy After:=Sheets(3)
...(more code)...
Call resetInterface(True, True, (wasScreenUpdating), (wasProtected))

and for the “resetInterface” function:

' Final operations for a typical function/sub '
Function resetInterface(Optional calc As Boolean = False, Optional ccmode As Boolean = False, Optional scrUpdate As Boolean = True, Optional protectWS As Boolean = False)
    With Application
        If calc Then
            .Calculation = xlCalculationAutomatic
            .Calculate
        End If
        If ccmode Then .CutCopyMode = False
        .ScreenUpdating = scrUpdate
    End With
    If protectWS Then ActiveSheet.Protect
End Function
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T20:52:22+00:00Added an answer on May 12, 2026 at 8:52 pm

    There used to be a problem when copying sheets in Excel that the CodeName property of the Worksheet object would be appended with a 1 and get to be too long. I think it’s been fixed, but it would depend on what version you’re using.

    Open the VBA (Alt+F11) and show the Project Explorer (Ctl+R). Look at the CodeNames of your copied sheets. Are they Sheet1, Sheet2, etc..? Or are they Sheet1, Sheet11, Sheet111, etc…? If the latter, this may be causing the problem. See http://support.microsoft.com/kb/177634

    Or it could be that you have a workbook level name, see http://support.microsoft.com/?kbid=210684

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Excel 2003 workbook that contains a macro to copy certain of
How do I save each sheet in an Excel workbook to separate CSV files
When I try to create a Excel 2007 Workbook project, in Visual Studio 2008,
When I try to create a Excel or Word workbook project in VS, I
I want to copy 10 rows from a workbook into a new workbook. The
I would like to copy a macro from one Excel workbook to another using
I'd like to copy (or move) a worksheet from one workbook to another workbook
I have a need to copy a worksheet from one workbook into another and
I've got an Excel workbook that's got some crazy calculations in it. I managed
I have some data that's currently stored in an Excel workbook. It makes sense

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.