Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Renaming all sheets in a workbook according to a specific cell.

This isn't a questions, but the code I was able to pull together using
responses from other questions.
The following is the code I used to rename every sheet/tab in a workbook.
Each sheet had it's desired name in it, in a the same cell ("E4").


Sub Rename()

Dim sh As Worksheet

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

End Sub


By doing this I was able refernce "E4" of each sheet back to a main sheet.
This way I can change all tab names by putting the desired name for each tab
in the main sheet, then running this macro.

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 hide scroll bars on specific sheets within a workbook AzMan Excel Discussion (Misc queries) 2 October 29th 07 12:36 PM
Print sheets by "All Sheets in workbook, EXCEPT for specific named sheets". Possible? Corey Excel Programming 2 December 11th 06 01:35 AM
Copy specific Sheets and save them as a workbook Rock* Excel Programming 2 March 13th 06 08:28 PM
Finding specific sheets within a workbook Roy Excel Discussion (Misc queries) 2 August 23rd 05 06:40 PM
Renaming Sheets in a workbook Cameron MacRae Excel Programming 2 December 18th 03 11:19 PM


All times are GMT +1. The time now is 11:36 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"