How to do Selection.Subtotal in VBScript/ASP ?

  • Thread starter Thread starter Don Smith
  • Start date Start date
D

Don Smith

Anyone with experience in these matters? I am trying to group an Excel
sheet from VBScript.

No trouble doing it from a macro...

Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5, 6,
7, 8), Replace:=False, PageBreaks:=False, SummaryBelowData:=True

but I can't get it to work in VBS. Specifically, this does not work,
even though it should - intrinsic constant xlSum is replaced with its
value...

objXL.Selection.Subtotal 1, -4167, Array(5, 6, 7, 8), False, False,
True

Web search shows that others have had the same problem, but no solution
given. References to an April, 2005 article in Windows Scripting
Solutions, but I don't have that.

Thanks for any assistance!
 
I realize I made a typo in my message and the value of xlSum is -4157,
not -4167. But that is not the problem. The vbs "runs" with no
errors, but it just doesn't do anything.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top