Your technology certification is waiting. Enroll in Cloud Class ®
Dim N As Integer
Dim M As Integer
Set sel = ActiveWindow.SelectedSheets
For M = 1 To sel.Count
For N = M To sel.Count
If UCase(sel.Item(N).Name) < UCase(sel.Item(M).Name) Then
Open in new window
''/// sort worksheets in a workbook in ascending order
Dim iCnt As Integer, iX As Integer, iJ As Integer
Application.ScreenUpdating = False
iCnt = Worksheets.Count
If iCnt = 1 Then Exit Sub
For iX = 1 To iCnt - 1
For iJ = iX + 1 To iCnt
If Worksheets(iJ).Name < Worksheets(iX).Name Then
The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.