I now took the .Subtotal out and the error goes away. The subtotal line is created but the columns in my array la1 are not created?
How can I pass the column numbers??
Peter
>the following reports oRange is not an object
>
>
>oRange=THISFORM.oExcel.activesheet.RANGE("a4:l"+TRANSFORM(lnNumRecs))
>
>oRange.selection.Subtotal(1,-4157,la1,.t.,.f.,.t.)
>>
>
>It is supposed to subtotal on theleftmost column. la1 is an array with 5 members each being the column number of the5 colums which need to be subtotaled
>
>Anyone any ideas??
>
>Thanks
>Peter
Peter Cortiel