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

I'm a novice with VBA macros, 1st off.

I'm continually creating workbooks with 100 or more tabs, but need
quick way to rename each tab.

In each worksheet, I have the name I want on the tab stored in cel
A1.

Can someone tell me how to create a macro that will rename each shee
to the value in cell A1 of that same sheet?

Thanks

Windows 2000
Excel 200

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Renaming Worksheets

Easy enough

Sub RenameSheetsToA1()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Name = ws.Cells(1, 1)
Next
End Sub

"rbanks " wrote:

I'm a novice with VBA macros, 1st off.

I'm continually creating workbooks with 100 or more tabs, but need a
quick way to rename each tab.

In each worksheet, I have the name I want on the tab stored in cell
A1.

Can someone tell me how to create a macro that will rename each sheet
to the value in cell A1 of that same sheet?

Thanks

Windows 2000
Excel 2000


---
Message posted from http://www.ExcelForum.com/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Renaming Worksheets


For Each sh In ActiveWorkbook.Worksheets
sh.Name = sh.Range("A1").Value
Next sh

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"rbanks " wrote in message
...
I'm a novice with VBA macros, 1st off.

I'm continually creating workbooks with 100 or more tabs, but need a
quick way to rename each tab.

In each worksheet, I have the name I want on the tab stored in cell
A1.

Can someone tell me how to create a macro that will rename each sheet
to the value in cell A1 of that same sheet?

Thanks

Windows 2000
Excel 2000


---
Message posted from http://www.ExcelForum.com/



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
Renaming worksheets Teeny Excel Discussion (Misc queries) 8 August 18th 09 10:21 PM
Renaming worksheets James Excel Worksheet Functions 0 May 12th 09 11:45 PM
RENAMING WORKSHEETS LEOPARDSHIDEAWAY Excel Worksheet Functions 1 July 26th 07 10:27 PM
Renaming worksheets Mike Allen Excel Discussion (Misc queries) 8 January 21st 07 02:15 AM
Renaming Worksheets Steve Walford Excel Worksheet Functions 3 April 1st 05 09:29 PM


All times are GMT +1. The time now is 05:12 PM.

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"