I have a workbook with 20 named sheets.
How can I programmatically arrange them in alphabetical order?
--
donwb
try chip pearson's code:
Sub AlphaSortWorksheets()
Dim N As Integer
Dim M As Integer
Dim FirstWSToSort As Integer
Dim LastWSToSort As Integer
Dim SortDescending As Boolean
SortDescending = False
FirstWSToSort = 1
LastWSToSort = Worksheets.Count
For M = FirstWSToSort To LastWSToSort
For N = M To LastWSToSort
If SortDescending = True Then
If UCase(Worksheets(N).Name) > _
UCase(Worksheets(M).Name) Then
Worksheets(N).Move before:=Worksheets(M)
End If
Else
If UCase(Worksheets(N).Name) < _
UCase(Worksheets(M).Name) Then
Worksheets(N).Move before:=Worksheets(M)
End If
End If
Next N
Next M
End Sub

Signature
Gary
>I have a workbook with 20 named sheets.
> How can I programmatically arrange them in alphabetical order?
> --
> donwb
donbowyer - 22 Sep 2006 13:06 GMT
Thangs Gary worked fine

Signature
donwb
> try chip pearson's code:
>
[quoted text clipped - 32 lines]
> > --
> > donwb