Hi there,
I have the below vba code that is supposed to apply subtotals to the said worksheet.
However, the 'With Sheets("FX SWAP SCRL")' is ignored and subtotals are applied (correctly) in the worksheet I'm in, not the one specified. I might have something wrong.
Sub ECB_Subtotals()
With Sheets("FX SWAP SCRL")
Range("A:W").Subtotal GroupBy:=5, Function:=xlSum, TotalList:=Array(15, 8, 9), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
ActiveSheet.Outline.ShowLevels RowLevels:=2
End With
End Sub
Cheers,
I have the below vba code that is supposed to apply subtotals to the said worksheet.
However, the 'With Sheets("FX SWAP SCRL")' is ignored and subtotals are applied (correctly) in the worksheet I'm in, not the one specified. I might have something wrong.
Sub ECB_Subtotals()
With Sheets("FX SWAP SCRL")
Range("A:W").Subtotal GroupBy:=5, Function:=xlSum, TotalList:=Array(15, 8, 9), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
ActiveSheet.Outline.ShowLevels RowLevels:=2
End With
End Sub
Cheers,