JeffGrant
Well-known Member
- Joined
- Apr 7, 2021
- Messages
- 558
- Office Version
- 365
- Platform
- Windows
Hi All,
I have this vba code which operates over several sheets:
which has been working for months and months without any problems.
Last week, it started to throw the
"Microsoft Excel cannot determine which row in your list or selection contains column labels......."
The first row in the Range("A1").CurrentRegion.Select, ie row 1 is the label row.
When I add the sub-totals manually, everything is fine.
When I use the macro recorder, this line records the same:
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5), Replace:=True, PageBreaks:=False, SummaryBelowData:=True
I don't undersdtand why the VBA code cannot determine why Row 1 is not the label row now.
Any ideas would be greatly appreciated.
Jeff.
I have this vba code which operates over several sheets:
VBA Code:
Sheet13.Select
Range("A1").CurrentRegion.Select
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5), Replace:=True, PageBreaks:=False, SummaryBelowData:=True
ActiveSheet.Outline.ShowLevels RowLevels:=3
which has been working for months and months without any problems.
Last week, it started to throw the
"Microsoft Excel cannot determine which row in your list or selection contains column labels......."
The first row in the Range("A1").CurrentRegion.Select, ie row 1 is the label row.
When I add the sub-totals manually, everything is fine.
When I use the macro recorder, this line records the same:
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5), Replace:=True, PageBreaks:=False, SummaryBelowData:=True
I don't undersdtand why the VBA code cannot determine why Row 1 is not the label row now.
Any ideas would be greatly appreciated.
Jeff.