Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Worksheet Tabs - Alphabetizing

0 views
Skip to first unread message

Barbara Rhodes-Bridges

unread,
Sep 24, 2003, 3:46:49 PM9/24/03
to
Is there a way to alphabetize the worksheets without
moving (click & drag) them manually?

Danny

unread,
Sep 24, 2003, 4:07:25 PM9/24/03
to
Sub SortAllSheets()

Dim iSheet As Integer, iBefore As Integer
For iSheet = 1 To ActiveWorkbook.Sheets.Count
Sheets(iSheet).Visible = True
For iBefore = 1 To iSheet - 1
If UCase(Sheets(iBefore).Name) > UCase(Sheets
(iSheet).Name) Then
ActiveWorkbook.Sheets(iSheet).Move
Before:=ActiveWorkbook.Sheets(iBefore)
Exit For
End If
Next iBefore
Next iSheet
End Sub

>-----Original Message-----
>Is there a way to alphabetize the worksheets without
>moving (click & drag) them manually?

>.
>

0 new messages