how can i re-sort multiple worksheets into alphabetical order

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.
 
M

MikeSN

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
 

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