I'm wondering if there is a way to have an Excel spreadsheet sorted that allows for more than three sort criteria. For example, I have a spreadsheet to be sorted as follows:

xlApp.Range("A1", "Z65536").Sort key1:=xlApp.Columns(lnScopeColumn), Order1:=xlAscending, key2:=xlApp.Columns(lnTypeOfEventColumn), Order2:=xlAscending, key3:=xlApp.Columns(lnDataDateAndTimeStampColumn), Order3:=xlDescending, Header:=xlNo

As you can see from the range I have selected I have 26 columns of data to sort. I need to have the data sorted by four different criteria to get the data in the order I need. Is there a function to allow this or will I need to define my own sorting subroutine to sort with all of the criteria I need? If the sort function allowed for a fourth sort key my sort call would look somthing like this:

xlApp.Range("A1", "Z65536").Sort key1:=xlApp.Columns(lnScopeColumn), Order1:=xlAscending, key2:=xlApp.Columns(lnTypeOfEventColumn), Order2:=xlAscending, key3:=xlApp.Columns(lnDataDateAndTimeStampColumn), Order3:=xlDescending, key4:=xlapp.Columns(lnRecordStatus), Order4:=xlAscending, Header:=xlNo