On excel tabs at the bottom each has a different name as I work they get moved around. Is there any way to reline them from a to z
Thanks William
On excel tabs at the bottom each has a different name as I work they get moved around. Is there any way to reline them from a to z
Thanks William
I requires VBA.
Why not just drag them into the order you wish?
Entia non sunt multiplicanda sine necessitate
yes that is what I do working on them I drag them from one end to the other but at the end of the day I would like to hit a button and the tabs would all go back to where they were you see I have over 250 tabs and I really mess them up thank you looking in vba now hoping to find what I am looking for. you help a great deal
![]()
Sub SortMe() SortSheets End Sub Sub SortSheets(Optional wkb As Workbook = Nothing, _ Optional ByVal iBeg As Long = 1, _ Optional ByVal iEnd As Long = 2147483647) ' shg 2009-09 ' Insertion-sorts sheets from iBeg to iEnd Dim i As Long Dim j As Long If wkb Is Nothing Then Set wkb = ActiveWorkbook With wkb If iBeg < 1 Then iBeg = 1 If iEnd > .Sheets.Count Then iEnd = .Sheets.Count For i = iBeg + 1 To iEnd For j = iBeg To i - 1 If StrComp(.Sheets(i).Name, .Sheets(j).Name, vbTextCompare) <> 1 Then .Sheets(i).Move Before:=.Sheets(j) Exit For End If Next j Next i End With End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks