+ Reply to Thread
Results 1 to 2 of 2

Renaming Worksheet

  1. #1
    LizW
    Guest

    Renaming Worksheet

    Given 2 open spreadsheets - A and B. I copied Sheet1 from B to A using the
    Move/Copy option at the tab level. It copied into A okay and renamed it
    SearchResults 1 so that I can run a macro to rename to SearchResults. When I
    run my macro to rename spreadsheet does not work .... if I just simply Copy
    and Paste using the Edit menu and then rename to SearchResults 1 - then my
    macro works. Here is the syntax...

    ActiveWorkbook.Sheets("SearchResults 1").Select
    Sheets("SearchResults 1").Name = "SearchResults"

    Spelling was checked the first time it did not run.

    --
    LizW

  2. #2
    Ron de Bruin
    Guest

    Re: Renaming Worksheet

    Maybe you have a extra space

    You don't have to select it first

    Sheets("SearchResults 1").Name = "SearchResults"

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "LizW" <LizW@discussions.microsoft.com> wrote in message news:423E003A-1C15-42FD-B927-0E213E36C5DB@microsoft.com...
    > Given 2 open spreadsheets - A and B. I copied Sheet1 from B to A using the
    > Move/Copy option at the tab level. It copied into A okay and renamed it
    > SearchResults 1 so that I can run a macro to rename to SearchResults. When I
    > run my macro to rename spreadsheet does not work .... if I just simply Copy
    > and Paste using the Edit menu and then rename to SearchResults 1 - then my
    > macro works. Here is the syntax...
    >
    > ActiveWorkbook.Sheets("SearchResults 1").Select
    > Sheets("SearchResults 1").Name = "SearchResults"
    >
    > Spelling was checked the first time it did not run.
    >
    > --
    > LizW




+ 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