ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Rename Worksheet without Selecting the sheet (https://www.excelbanter.com/excel-programming/379282-re-rename-worksheet-without-selecting-sheet.html)

Don Guillett

Rename Worksheet without Selecting the sheet
 

try

Sub renameshts()
mc = 1
For Each ws In Worksheets
If ws.Name < "Main" Then _
ws.Name = "mysht" & mc
mc = mc + 1
Next ws
End Sub

--
Don Guillett
SalesAid Software

"JR_06062005" wrote in message
...
Is there another way to rename a worksheet other than
ActiveWorkSheet.Name="New Name"?

I would like to rename a series of worksheets, but am not sure how to do
this without selecting each one.





All times are GMT +1. The time now is 07:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com