LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default using VBA to rename active sheet


Not sure exactly what your up to, but here's my thoughts:

Sheets("Sheet1").Name = 1
Sheets("Sheet2").Name = 2
Sheets("Sheet3").Name = 3

Or if you want to do them in a loop based on their orignal names,

Dim i As Integer

For i = 1 to 3
Sheets("Sheet" & i).Name = i
Next

If you want to just rename the sheets based on how they are currentl
ordered,

Dim i As Integer

For i = 1 To Worksheets.Count
Sheets(i).Name = i
Next

Hope this helps,



--
kkkni
-----------------------------------------------------------------------
kkknie's Profile: http://www.excelforum.com/member.php...nfo&userid=754
View this thread: http://www.excelforum.com/showthread.php?threadid=26966

 
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 rename a sheet if the rename tab is inactive? Nelson Excel Worksheet Functions 1 March 3rd 10 10:28 AM
Move data to new sheet - rename sheet based on criteria ? [email protected] Excel Discussion (Misc queries) 7 May 16th 07 10:22 PM
Rename active sheet lumaduc Excel Programming 1 June 3rd 04 08:46 PM
Rename active sheet Ginny[_2_] Excel Programming 2 January 9th 04 10:59 PM
Rename Active Sheet Jason[_25_] Excel Programming 2 September 21st 03 02:03 AM


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