Excel's function "Subtotal" trouble

Hi, I want to use Excel function “Subtotal” from Navision, but problem is here: When i write sheet.range(‘A9:U18’).subtotal(4,-4157,‘6’); all work properly. column F have a subtotals. But I need subtotals in columns F & G. sheet.range(‘A9:U18’).subtotal(4,-4157,‘6,7’); doesn’t work [:(!] Is anybody can help?

as i understand Excel want ARRAY in parameters sheet.range(‘A9:U18’).subtotal(4,-4157,ARRAY); Excel macro: Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5, 6), Replace:=True, PageBreaks:=False, SummaryBelowData:=True But how do this from Navision… arr[1]:=5; try arr as Variant,as Integer, as Code arr[2]:=6; sheet.range(‘A9:U18’).subtotal(4,-4157,arr); - nothing….