Hi,
Is it possible to write a VBA to sort all the TABS base on their names ?
Thanks.
Hi,
Is it possible to write a VBA to sort all the TABS base on their names ?
Thanks.
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 before:=Worksheets(M)
End If
Else
If UCase(Worksheets(N).Name) < _
UCase(Worksheets(M).Name) Then
Worksheets(N).Move before:=Worksheets(M)
End If
End If
Next N
Next M
End Sub
---
Regards,
Norman
"A-Design" <afshinstock@hotmail.com> wrote in message
news:eU7mrtyhFHA.3692@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> Is it possible to write a VBA to sort all the TABS base on their names ?
>
> Thanks.
>
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" <afshinstock@hotmail.com> wrote in message
news:eU7mrtyhFHA.3692@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> Is it possible to write a VBA to sort all the TABS base on
> their names ?
>
> Thanks.
>
Thank you so much for your helps.
"Chip Pearson" <chip@cpearson.com> wrote in message
news:uBjAL5yhFHA.3692@TK2MSFTNGP09.phx.gbl...
> 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" <afshinstock@hotmail.com> wrote in message
> news:eU7mrtyhFHA.3692@TK2MSFTNGP09.phx.gbl...
>> Hi,
>>
>> Is it possible to write a VBA to sort all the TABS base on their names ?
>>
>> Thanks.
>>
>
>
Thank you very much for replies.
"Chip Pearson" <chip@cpearson.com> wrote in message
news:uBjAL5yhFHA.3692@TK2MSFTNGP09.phx.gbl...
> 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" <afshinstock@hotmail.com> wrote in message
> news:eU7mrtyhFHA.3692@TK2MSFTNGP09.phx.gbl...
>> Hi,
>>
>> Is it possible to write a VBA to sort all the TABS base on their names ?
>>
>> Thanks.
>>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks