Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Worksheet renaming | Excel Discussion (Misc queries) | |||
Worksheet Renaming | Excel Discussion (Misc queries) | |||
Worksheet Renaming | Excel Worksheet Functions | |||
need help renaming a worksheet | Excel Discussion (Misc queries) | |||
Renaming the Worksheet through VBA | Excel Programming |