+ Reply to Thread
Results 1 to 3 of 3

Copy/create new worksheet Macro working every other time

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    Baltimore, md
    MS-Off Ver
    Excel 2010
    Posts
    2

    Copy/create new worksheet Macro working every other time

    I have a macro which tracks information for every day of the month. Each day is a separate worksheet. I want to be able to copy the current worksheet to a new worksheet and name the new worksheet the next day. The worksheets are named 1,2,3,4,5 for the days of the week.

    I have the attached macro but it is only working every other time the macro is run and I can not figure out why. Hopefully someone can help me. I believe it has something to do with the protection of the workbook. Thanks
    Please Login or Register  to view this content.
    Last edited by MakMom; 09-20-2012 at 06:08 PM. Reason: revise code

  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: Copy/create new worksheet Macro working every other time

    Hi, MakMom,

    try it like this:

    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

  3. #3
    Registered User
    Join Date
    09-10-2012
    Location
    Baltimore, md
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Copy/create new worksheet Macro working every other time

    Thank you HaHoBe!

    I had been working on it for a week. Was the issue that I had forgotted to unprotect the worksheet or that I needed to identify the activeworkbook at the start of the macro? Again, thank you.

    Lynn

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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