+ Reply to Thread
Results 1 to 3 of 3

Getting Sheet name from codename?

  1. #1
    Forum Contributor
    Join Date
    09-21-2014
    Location
    Midwest USA
    MS-Off Ver
    2010
    Posts
    349

    Getting Sheet name from codename?

    I’ve defined codenames for the worksheets in a workbook. The worksheet Properties window shows both the codename and user-defined sheet name .

    If I leave the codename for Sheet2 unchanged but change the user-defined sheet name to “My Sheet”, in the Intermediate window entering ?sheet2.Name returns “My Sheet.” So far, so good.

    However, if I change the codename to “OrigSh” and change the user-defined sheet name to “My Sheet”, entering ?OrigSh.Name in the Intermediate window returns a 424 Object error.

    This discrepancy is causing my code to error. Is this an inherent with using custom codenames or do I need to change the syntax to get the sheet name associated with a custom codename or do I need to change my code?
    Thanks for reading – appreciate any help.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Getting Sheet name from codename?

    Again?
    https://www.excelforum.com/excel-pro...es-in-vba.html

    Please Login or Register  to view this content.
    http://www.ozgrid.com/forum/showthre...088#post652088

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Getting Sheet name from codename?

    Hello
    It is working for me without any errors at all .. Make sure you have typed the correct codename in both properties window and immediate window
    Have a look
    Attached Files Attached Files
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

+ 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] VBA sub for sheet with codename
    By Roadhouse in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-05-2016, 04:00 PM
  2. [SOLVED] Sheet Codename
    By Ravana in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2015, 12:34 PM
  3. [SOLVED] Selecting sheet by codename in a multi sheet code
    By jshaw82 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-18-2013, 10:46 AM
  4. trying to use sheet CodeName to list all sheet names in a workbook
    By neowok in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2012, 12:06 PM
  5. sheet codename issue
    By elprup in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-18-2010, 02:37 PM
  6. Get sheet (CodeName) not .Name
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-14-2010, 01:54 PM
  7. Renaming the sheet codename
    By wjones in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-14-2010, 12:47 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