Tmm,<br>
<br>
Why don't you create a reference to an "Excel.Application" in your project, then add a reference to the document where you are write the records to. Next I would go into excel, open the file with sample data in it. Start to record a new macro (from the tools/macro menu). Next use excel to do the sort, when you are happy with the results stop the macro. I would then open the macro in design mode and copy and paste your code in VB, making changes to allow for the fact that the variable you referenced will be doing this. <br>
<br>
I use this method when I writing code for office applications and don't know the correct office VBA syntax - it works for me.<br>
<br>
Let me know if you need an example - I'll try and do it myself.<br>
<br>
C