How do I automatically get my tabs to alphabetize?
How do I automatically get my tabs to alphabetize?
Sub SortALLSheets()
'sort sheets within a workbook in Excel 7 -- Bill Manville
'modified to sort all sheets instead of just worksheets
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
Insert this code into a module
There is no built-in way to do this. You need some VBA code. See
www.cpearson.com/excel/sortws.htm.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Chris Zrepskey" <Chris Zrepskey@discussions.microsoft.com> wrote
in message
news:723A4C32-0167-4BFB-8200-29A21524AB04@microsoft.com...
> How do I automatically get my tabs to alphabetize?
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks