Does anybody know how to amend this code so it works in Access.
Set xlApp = CreateObject("Excel.Application")
xlApp.Cells.Select
xlApp.Selection.Subtotal GroupBy:=11, Function:=xlSum, TotalList:=Array(10), Replace:=True, PageBreaks:=False, SummaryBelowData:=True
xlApp.ActiveSheet.Outline.ShowLevels RowLevels:=2
xlApp.Range("M1").Select
It currently gets stuck on the line
xlApp.Selection.Subtotal GroupBy:=11, Function:=xlSum, TotalList:=Array(10), Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Thanks
Set xlApp = CreateObject("Excel.Application")
xlApp.Cells.Select
xlApp.Selection.Subtotal GroupBy:=11, Function:=xlSum, TotalList:=Array(10), Replace:=True, PageBreaks:=False, SummaryBelowData:=True
xlApp.ActiveSheet.Outline.ShowLevels RowLevels:=2
xlApp.Range("M1").Select
It currently gets stuck on the line
xlApp.Selection.Subtotal GroupBy:=11, Function:=xlSum, TotalList:=Array(10), Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Thanks