Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort the Tabs
Hi,
Is it possible to write a VBA to sort all the TABS base on their names ? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort the Tabs
Hi A-Design,
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 befo=Worksheets(M) End If Else If UCase(Worksheets(N).Name) < _ UCase(Worksheets(M).Name) Then Worksheets(N).Move befo=Worksheets(M) End If End If Next N Next M End Sub --- Regards, Norman "A-Design" wrote in message ... Hi, Is it possible to write a VBA to sort all the TABS base on their names ? Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort the Tabs
See www.cpearson.com/excel/sortws.htm for VBA code to do this.
-- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "A-Design" wrote in message ... Hi, Is it possible to write a VBA to sort all the TABS base on their names ? Thanks. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort the Tabs
Thank you so much for your helps.
"Chip Pearson" wrote in message ... See www.cpearson.com/excel/sortws.htm for VBA code to do this. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "A-Design" wrote in message ... Hi, Is it possible to write a VBA to sort all the TABS base on their names ? Thanks. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort the Tabs
Thank you very much for replies.
"Chip Pearson" wrote in message ... See www.cpearson.com/excel/sortws.htm for VBA code to do this. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "A-Design" wrote in message ... Hi, Is it possible to write a VBA to sort all the TABS base on their names ? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sort Data Cross Tabs | Excel Worksheet Functions | |||
how do I sort tabs on an excel spreadsheet | Excel Worksheet Functions | |||
Is it possible to sort the tabs in a workbook? | Excel Discussion (Misc queries) | |||
Sort tabs | Excel Discussion (Misc queries) | |||
Re-Sort Worksheet tabs | Excel Worksheet Functions |