Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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" 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheet renaming jwilliam33 Excel Discussion (Misc queries) 5 December 6th 08 09:14 PM
Worksheet Renaming Eric Excel Discussion (Misc queries) 2 July 26th 07 02:44 PM
Worksheet Renaming Eric Excel Worksheet Functions 1 July 26th 07 02:38 PM
need help renaming a worksheet jonwyn Excel Discussion (Misc queries) 2 March 1st 05 08:34 PM
Renaming the Worksheet through VBA abxy[_24_] Excel Programming 4 February 9th 04 07:32 PM


All times are GMT +1. The time now is 10:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"