View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.misc
Wally Wally is offline
external usenet poster
 
Posts: 42
Default Rename all existing worksheet tabs

WOW! It's magic. Thank You Dave

"Dave Peterson" wrote:

One way:

Option Explicit
Sub testme01()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
With wks
On Error Resume Next
.Name = .Range("a1").Text
If Err.Number < 0 Then
MsgBox .Name & " was not renamed"
Err.Clear
End If
On Error GoTo 0
End With
Next wks
End Sub

Wally wrote:

I have a similar need, but wish to rename the tabs by referencing the same
cell on each worksheet that contains an invoice number.

"Dave Peterson" wrote:

There's not in Excel's user interface that would allow you do to lots of renames
all at once. You'd need a macro or do it manually (over and over).

rizello wrote:

Hello:

I would like to do this also. Is it possible to do without using VBA, but
simply a command in Excel?

"MikeM" wrote:

I would like to take an existing workbook and rename all the worksheet tabs
at one time. For example, I might have ten worksheets with various names and
I'd like them all to be named USA1, USA2, USA3 and so on.

Can this be easily done with some VBA code? (I've seen some similar
questions, but none exactly like this one.)

Thanks.

--

Dave Peterson


--

Dave Peterson