View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default How to do selection.subtotal in VBScript/ASP ?

Try replacing xlSum with its value -4157

--
Regards,
Tom Ogilvy

"Wes" wrote in message
...
I need to run subtotals on an excel sheet from an ASP
page. I'm able to create the page and populate it with
data, but I can not figure out how to subtotal.

When I created a macro, the VB line was the following:
Selection.Subtotal GroupBy:=5, Function:=xlSum,
TotalList:=Array(10, 12, 13 _
), Replace:=True, PageBreaks:=False,
SummaryBelowData:=True

This line creates an error in the ASP page, and I read
that I should remove the names and := suymbols. This
gave me the following line:
.Selection.Subtotal 5, xlSum, Array(10, 12, 13, 16, 18,
21, 24, 27), True, False, True

This line does not create an error, but it doesn't
subtotal either, it just cuases the browser to hang.

I read how to do this in Fox Pro, so I assume their is a
way to handle it in VB Script.

Thanks!