Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old July 11th 03, 09:05 AM posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 9,221
Default Macro to rename all worksheets with cell value in each sheet

Hi guys,

I need help for a macro to loop through all worksheets (identical
structure), copy the contents of B2 and rename the sheet with it, all at one
go. B2 will hold text (different for each sheet). I'm using xl97.

TIA
Max



  #2   Report Post  
Old July 11th 03, 10:58 AM posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 9,221
Default Macro to rename all worksheets with cell value in each sheet

Many thanks, Neil!
It runs smoothly.

Neil wrote in message
...
Max,
Try this

Sub RenameWS()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Activate
ws.Name = Range("B2").Value
Next
End Sub

Neil


"Max" wrote in message
...
Hi guys,

I need help for a macro to loop through all worksheets (identical
structure), copy the contents of B2 and rename the sheet with it, all at

one
go. B2 will hold text (different for each sheet). I'm using xl97.

TIA
Max








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
how do i create a macro to rename worksheets in excel? Waki Excel Discussion (Misc queries) 6 January 28th 10 04:06 PM
Macro REQ: Automatically copy a template sheet and rename MCSmarties Excel Worksheet Functions 5 October 11th 07 09:18 PM
macro to: Add new sheet, then rename new sheet with todays date Paul Excel Worksheet Functions 3 September 29th 07 03:17 AM
Rename Sheet using Cell Reference RDana Excel Worksheet Functions 4 July 2nd 07 07:54 PM
How do I automatically rename a sheet with the contents of a cell. michaelspearin Excel Discussion (Misc queries) 3 December 3rd 04 09:27 PM


All times are GMT +1. The time now is 09:59 PM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017