I was just wondering, is there a limit how many rows I can sort with a macro?
I wrote a simple sort function as a part of a bigger project and it has worked perfectly for years. I have a spreadsheet with a two column list. I add stuff at the end of that list and then sort it after each new post. It has worked perfectly as I said, until today. Now the last entry remains at last row. The first column is numbers and the second is names, kind of, and I sort to get the names in alphabetic order. The name of the last row starts with a ”B”, but as I said, it remains at the last position rather than somewhere at the beginning of the list. The only difference between now and earlier when the macro worked, is that the list now contains more than 800 rows (801; 802 if the header row is counted), which keeps me wonder if there is some kind of 800 rows limit… Here's the sort subroutine: Sub SortStatistics(Range As Object,Field As Integer,Mode As Boolean) Dim SortFields(1) As New com.sun.star.util.SortField Dim SortDesc(1) As New com.sun.star.beans.PropertyValue ThisComponent.getCurrentController.Select(Range) SortFields(0).Field=Field SortFields(0).SortAscending=Mode SortDesc(0).Name="SortFields" SortDesc(0).Value=SortFields() SortDesc(1).Name="ContainsHeader" SortDesc(1).Value=True Range.Sort(SortDesc()) End Sub Am I missing something? LibreOffice 3.5.5.3 Kind regards Johnny Rosenberg ジョニー・ローゼンバーグ -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted