worksheet tabs

  • Thread starter Thread starter Ruth
  • Start date Start date
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?
 
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
 
Back
Top