worksheet tabs

R

Ruth

Hi

In the 2003 excel-- Is there a way to have the worksheet tabs automatically
go in alphabetical order-- or do you have to do in manually?
 
H

Huber57

Ruth,

Use this code:

Sub ArrangeSheetsInOrder()
Dim iCount As Integer
Application.ScreenUpdating = False
iCount = Sheets.Count
For i = 1 To iCount - 1
For j = i + 1 To iCount
If Sheets(j).Name < Sheets(i).Name Then
Sheets(j).Move Before:=Sheets(i)
End If
Next j
Next i
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top