Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Rename worksheet

Hi

I need to create a macro that renames each worksheet to the contents in cell
A1 of each worksheet.

Any suggestions will be welcome.

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Rename worksheet


-----Original Message-----
Hi

I need to create a macro that renames each worksheet to

the contents in cell
A1 of each worksheet.

Any suggestions will be welcome.

Thanks

Try this, i havent tested it myself.
.
For each ws in activeworkbook

ws.name= ws.range("a1")
next ws
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Rename worksheet

That should be

Dim ws as Worksheet
For each ws in activeworkbook.worksheets
ws.name= ws.range("a1").value
next ws

--
Regards,
Tom Ogilvy

"nathan" wrote in message
...

-----Original Message-----
Hi

I need to create a macro that renames each worksheet to

the contents in cell
A1 of each worksheet.

Any suggestions will be welcome.

Thanks

Try this, i havent tested it myself.
.
For each ws in activeworkbook

ws.name= ws.range("a1")
next ws



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Rename worksheet

Perfect!

Works a treat

Thanks.


"Tom Ogilvy" wrote in message
...
That should be

Dim ws as Worksheet
For each ws in activeworkbook.worksheets
ws.name= ws.range("a1").value
next ws

--
Regards,
Tom Ogilvy

"nathan" wrote in message
...

-----Original Message-----
Hi

I need to create a macro that renames each worksheet to

the contents in cell
A1 of each worksheet.

Any suggestions will be welcome.

Thanks

Try this, i havent tested it myself.
.
For each ws in activeworkbook

ws.name= ws.range("a1")
next ws





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
Can't rename worksheet Brian Preston Excel Discussion (Misc queries) 1 October 15th 06 03:25 AM
Using information from one worksheet, to rename inserted worksheet Lyn Excel Worksheet Functions 0 March 24th 06 12:54 AM
why can't I rename my worksheet? cfc1905 Excel Discussion (Misc queries) 2 February 13th 06 03:19 PM
Rename the worksheet praveen_khm Excel Discussion (Misc queries) 1 January 17th 06 08:05 PM
rename worksheet Anthony Excel Discussion (Misc queries) 4 July 13th 05 01:16 AM


All times are GMT +1. The time now is 01:40 AM.

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

About Us

"It's about Microsoft Excel"