+ Reply to Thread
Results 1 to 5 of 5

Changing sheet names after macro coding has been done

  1. #1
    Registered User
    Join Date
    10-11-2020
    Location
    Oslo, Norway
    MS-Off Ver
    Excel for Mac
    Posts
    4

    Changing sheet names after macro coding has been done

    Hi,

    I have created a budget workbook for the household, and in it are 36 work sheets. So I don't have to punch in the budget numbers each month, I coded a button which copies from the previous month, and it's working. However, I have called each of these sheets for the month plus the name of me or my SO (ex. "February John" or "March Jane") and these are the sheet names I've used in the macro coding. Now I want to give the workbook to a couple of friends so they can use it with their names, but how do I change the name of the sheets AND still keep the coding?

    Thank for all the help

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Changing sheet names after macro coding has been done

    It would be easier to help and test possible solutions if you could attach a copy of your file. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary). See the yellow banner at the top of this page for instructions to attach a file. At the very least, post a copy of your current macro.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Changing sheet names after macro coding has been done

    Use the SheetCodeName (the name NOT between brackets in the Project Explorer) in your code instead of the Tab Names.

    That way changing the Tabnames will not effect your code.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Registered User
    Join Date
    10-11-2020
    Location
    Oslo, Norway
    MS-Off Ver
    Excel for Mac
    Posts
    4

    Re: Changing sheet names after macro coding has been done

    That worked perfectly, thank you

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Changing sheet names after macro coding has been done

    You're welcome and thanks for rep+.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Excel changing Chart sheet names after Macro is run
    By Kevchenk0 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-08-2020, 11:20 AM
  2. [SOLVED] Create an Array which has Sheet Names excluding a Few Sheet Names to be used in a MACRO
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-29-2013, 03:24 PM
  3. Changing Sheet Names Based on # Values in Names
    By Mordred in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-01-2010, 03:34 PM
  4. Using Sheet names & Workbook names in VBA coding
    By Colin Foster in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-07-2006, 02:10 PM
  5. Changing Sheet Names
    By Gavin Ling in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-06-2006, 01:58 PM
  6. [SOLVED] Hidding Macro names and coding
    By mrbalaje in forum Excel General
    Replies: 4
    Last Post: 04-20-2005, 12:06 PM
  7. [SOLVED] Need sopme help coding Dates and Sheet names. (Please)
    By Dean Goodmen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-16-2005, 07: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