how can i re-sort multiple worksheets into alphabetical order

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a barrowload of multiple worksheets, but now client wants them in a
different order, is there, to save time, any way that Excel can re-sort them
in Alphabetical order.
 
Public Sub SortSheets()

Dim currentUpdating As Boolean
currentUpdating = Application.ScreenUpdating

Application.ScreenUpdating = False

For Each xlSheet In ActiveWorkbook.Worksheets
For Each xlSheet2 In ActiveWorkbook.Worksheets
If LCase(xlSheet2.Name) < LCase(xlSheet.Name) Then
xlSheet2.Move before:=xlSheet
End If
Next xlSheet2
Next xlSheet

Application.ScreenUpdating = currentUpdating

End Sub
 
Back
Top