Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Subtotal Array Question
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Excel Subtotal Array Question
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00953477
Message ID:
00953477
Views:
76
Hi All,
I have a small problem using the Excel Subtotal command. It works fine as long as the SUM is for a single column, but how do I pass an "Array" to allow for more than one column.

VBA Macro Code:

Selection.Subtotal GroupBy:=7, Function:=xlSum, TotalList:=Array(24, 31), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True


Foxpro Code:

xl.selection.subtotal('7',-4157,'24',.f.,.f.,.t.)



This works fine for column 24, but I have tried various combinations to pass both column 24 and column 31.

Does anyone have the correct syntax please.
Kevin Delaney
Financial Systems Manager
CPL Solutions Ltd

83 Merrion Square, Dublin 2, Ireland.
e: kevin.delaney@cpl.ie w: www.cpl.ie
p: +353 1 482-5368
Next
Reply
Map
View

Click here to load this message in the networking platform