Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To sort sheets by name, run this macro from https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=49828.

If (Not GlobalScope.BasicLibraries.isLibraryLoaded("Tools")) Then
   GlobalScope.BasicLibraries.LoadLibrary("Tools")
End If
Sheets = ThisComponent.Sheets
Names = Sheets.ElementNames
SortedList = BubbleSortList(Names) 'BubbleSortList is a macro in the Tools Library
for i = 0 to UBound(SortedList)
   Sheets.MoveByName(SortedList(i), i)
next i

To sort sheets by name, run this macro from https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=49828.

If (Not GlobalScope.BasicLibraries.isLibraryLoaded("Tools")) Then
   GlobalScope.BasicLibraries.LoadLibrary("Tools")
End If
Sheets = ThisComponent.Sheets
Names = Sheets.ElementNames
SortedList = BubbleSortList(Names) 'BubbleSortList is a macro in the Tools Library
Library'
for i = 0 to UBound(SortedList)
   Sheets.MoveByName(SortedList(i), i)
next i