Hello Everyone,
I am trying to get vba code using record macro to click “Do not show subtotal”

When I do record macro, it gives code like this
Can anyone provide a better solution to this?
Hello Everyone,
I am trying to get vba code using record macro to click “Do not show subtotal”

When I do record macro, it gives code like this
Can anyone provide a better solution to this?
An alternative solution would be to create a template and just use a copy of your template with every run.
Try this:
Sub DoNotShowSubtotal()
Dim ws As Worksheet
Dim rng As Range
Set ws = ThisWorkbook.Sheets("Sheet1")
Set rng = ws.Range("A1:D10")
rng.Subtotal GroupBy:=1, Function:=xlNone, TotalList:=Array(1), _
Replace:=False, PageBreaks:=False, SummaryBelowData:=True
End Sub
**Note: Enable Macro in Excel.
Hope it will helps you ![]()
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.