M
MDC
I am trying to setup a template file and need to
programmatically insert subtotals, but different users may
have more columns than others. The first 2 columns will
be the same for all users and the data will always be a
list with column names.
The code that the recorder makes for subtotalling is this:
Selection.Subtotal GroupBy:=1, Function:=xlSum,
TotalList:=Array(3, 4, 5, 6, _
7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, _
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46), Replace:=True, PageBreaks:=False, _
SummaryBelowData:=True
Any help would be appreciated.
MC
programmatically insert subtotals, but different users may
have more columns than others. The first 2 columns will
be the same for all users and the data will always be a
list with column names.
The code that the recorder makes for subtotalling is this:
Selection.Subtotal GroupBy:=1, Function:=xlSum,
TotalList:=Array(3, 4, 5, 6, _
7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, _
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46), Replace:=True, PageBreaks:=False, _
SummaryBelowData:=True
Any help would be appreciated.
MC