View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Formatting Excel from Access/Subtotals

Larry,
You can use the Object Browser (ViewObject browser) in any of the VBA
environments, as long as you have set a reference to the required library.
Enter "Subtotal" in the combo box next to the binocular button. Click that
button. Select from the matching the most appropriate. I get :
<Displayed at bottom
Function Subtotal(GroupBy As Long, Function As XlConsolidationFunction,
TotalList, [Replace], [PageBreaks], [SummaryBelowData As XlSummaryRow =
xlSummaryBelow])
Member of Excel.Range
</Displayed at bottom

NickHK

"LarryP" wrote in message
...
I'm trying to write VBA automation code that can be run in Access to

format
an Excel file. Have succeeded with most of the things I wanted to do, but
can't yet figure out how to set up subtotals that way. In general terms,
doing it from Access, everything I want to manipulate in Excel has to

first
be set up as an object -- xlApp, xlBook, xlThisSheet, etc., etc. (E.g., I
found by trial and error that the Excel page setup options reside in a
PageSetup object that is a 'child' of the worksheet object.) Problem is,

I
haven't yet been able to figure out what the object is that contains the
properties and methods related to subtotals. Is there anyone here in the
Excel community that can steer me in the right direction?