+ Reply to Thread
Results 1 to 3 of 3

Code that automatically renames sheet name when I type something in cell A1?

  1. #1
    Registered User
    Join Date
    03-30-2016
    Location
    New York, New York
    MS-Off Ver
    2016
    Posts
    1

    Code that automatically renames sheet name when I type something in cell A1?

    Can someone give me the whole code on how to make a sheet that I am currently on to get automatically renamed when I put something in A1, & then when I am on my next sheet & I type something in A1 again, I want it to do the same thing, & so on.

    The name that will go into the cells will be as dates, problem is the date formula has slashes & that doesn't register well with the sheet name, so I was wondering if it can grab the dashes that I type in the cell instead like 1-15-2000.

    & last but not least lol I was wondering if I can get the code with the error, check, message thingy, u know where if u put a slash, or more than 31 characters, etc., it will tell u there's an error, and u click ok, etc. :-) Thank uuu

    O & where do I put this code @? :-)

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Code that automatically renames sheet name when I type something in cell A1?

    Something like this maybe

    Put under Workbook

    Please Login or Register  to view this content.
    This code should not reach 31 chars issues nor have issues with the slash as it formats to specified format

    if sheet already exists it will go to err:
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,874

    Re: Code that automatically renames sheet name when I type something in cell A1?

    Here is for the 1st part.. Let me know if it is as required, and I will give the the code with error handlers

    Right click on the sheet name and select View Code.. Paste the below code there..

    Please Login or Register  to view this content.
    Try changing the value in cell A1 and see if it works
    Cheers!
    Deep Dave

+ 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] Looking to add to existing VBA code to type a word in a cell in a different sheet
    By Nitro2481 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-30-2015, 02:51 PM
  2. Macro that renames a sheet from two cells
    By goatie43 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2015, 04:26 AM
  3. Batch renames files in a directory based on sheet contents
    By Mike_136 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-08-2014, 02:40 PM
  4. VBA code to renames Tabs dependent on Cell name
    By Zyphon in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-28-2008, 05:44 AM
  5. [SOLVED] Excel renames sheet (repaired) when trying to change data from a .
    By Debbie in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-20-2005, 04:06 PM
  6. [SOLVED] Bug? Square brackets in file name confuses sheet renames
    By Rob van Gelder in forum Excel General
    Replies: 10
    Last Post: 03-20-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