>Sub Macro1_group() >' >' Macro1_group > > Range("A1:C14").Select > Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(3), _ > Replace:=True, PageBreaks:=False, SummaryBelowData:=True >End Sub > >The Excel commands usually come in two versions, one with "named parameters" which are not understood by Visual FoxPro, and one where the parameters are by position (as in Visual FoxPro). The parameters by position are usually in the same order as the saved macro, but I believe there is no guarantee for this; you had better check the VBA help for the Subtotal() function. If it is in the same order, it would be something like this:
oRange = oSheet.Range(oSheet.Cells(1, 1), oSheet.Cells(14, 3)) oRange.Subtotal(2, xlSum, Array(3), .T., .F., .T.)This would be the approximate syntax, but unfortunately I don't know what array(3) refers to in this case, and how to convert it.