I am trying to run a subtotal on a specific sheet (List) using the following code;
ActiveWorkbook.Sheets("List").Activate
Columns("A:G").Select
Selection.Subtotal GroupBy:=7, Function:=xlSum, TotalList:=Array(4, 5, 6)
However keep getting the following error (highlighting the final row of code);
Run-time error '1004:
Subtotal method of Range class failed
Any help would be much appreciated!
Thanks