+ Reply to Thread
Results 1 to 7 of 7

How do I rename a sheet?

  1. #1
    Forum Contributor
    Join Date
    03-04-2008
    Location
    Ohio
    MS-Off Ver
    Office 2010
    Posts
    208

    How do I rename a sheet?

    I want my code to rename the active sheet to "Sheet1".

    Neither one of these codes seems to work.

    Please Login or Register  to view this content.
    Or
    Please Login or Register  to view this content.
    I don't understand why this doesn't work. Any thoughts?

    Thanks,

    -gshock

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello gshock,

    Here is an example of renaming a sheet called "Quarterly Report" to "Sheet1".
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Forum Contributor
    Join Date
    03-04-2008
    Location
    Ohio
    MS-Off Ver
    Office 2010
    Posts
    208
    Quote Originally Posted by Leith Ross
    Hello gshock,

    Here is an example of renaming a sheet called "Quarterly Report" to "Sheet1".
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross
    Hi Leith,
    How do I make that work for any sheet name? Each file that is opened will have a different sheet name. So I want to write the code so that it will take a sheet with "any" name, and rename it to "Sheet1". Thanks for the help.


    -gshock
    Last edited by gshock; 03-20-2008 at 06:07 PM.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello gshock,

    Can you walk me through the steps you're using? Are these files single sheet workbooks?

    Thanks,
    Leith Ross

  5. #5
    Forum Contributor
    Join Date
    03-04-2008
    Location
    Ohio
    MS-Off Ver
    Office 2010
    Posts
    208
    Quote Originally Posted by Leith Ross
    Hello gshock,

    Can you walk me through the steps you're using? Are these files single sheet workbooks?

    Thanks,
    Leith Ross
    Hi Leith,
    Yes, I'd be happy to walk you through it. The user is going to open a (*.out) file. I want the macro to rename the sheet (single sheet workbook) to "Sheet1", and then save the file as a *.xls file type. Here's my code:

    Please Login or Register  to view this content.
    Thanks for the help.

    -gshock

  6. #6
    Forum Contributor
    Join Date
    03-04-2008
    Location
    Ohio
    MS-Off Ver
    Office 2010
    Posts
    208

    Cool

    Quote Originally Posted by Leith Ross
    Hello gshock,

    Can you walk me through the steps you're using? Are these files single sheet workbooks?

    Thanks,
    Leith Ross

    Leith,

    I figured it out. Here's what I had:
    Please Login or Register  to view this content.
    Here's what worked:
    Please Login or Register  to view this content.

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello gshock,

    Good job! Feels good when you can figure it out.

    Sincerely,
    Leith Ross

+ 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