Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Worksheets Names

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I am trying to figure out how I can name a worksheet(as an object) allow the user to change the sheet name and still be able to call the worksheet by the original name that I gave it. For example if you look in the project explorer you can name the worksheet in the "properties" window but you can also name the sheet by renaming the tab in the workbook in Excel's main window.

  2. #2
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You can refer to the sheet by it's index number:

    Code:
    sheets(1)
    or it's code (module) name:

    Code:
    sheet1
    These will respond irrespective of tab name.

    _________________
    Cheers, NateO

    [ This Message was edited by: NateO on 2002-05-03 08:36 ]

  3. #3
    MrExcel MVP Russell Hauf's Avatar
    Join Date
    Feb 2002
    Location
    Portland, OR Area - USA
    Posts
    1,609
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try using the CodeName property of the Worksheet object.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •