Excel Range Sorting

Help! This is becoming a bit desperate...

I have an application which produces a fairly involved excel spreadsheet via
TExcelApplication (O2K version). There are a great many lookups in the sheet
which require the lookup range to be sorted by the key column.

I cannot for the life of me get the SORT function of a range to work and
this is due to incorrect parameters. Excel reports invalid variant type
conversion at run-time.

Just *one* line of example code would make my week, finish the app, and
allow me to go back to sleep!

many, many thanks in advance


Te audire no possum. Musa sapientum fixa est in aure.