Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding page breaks to each subtotal 1

Status
Not open for further replies.

daveonion

Programmer
Aug 21, 2002
359
GB
hI,
I'ran the code to add subtotals to a spreadsheet, however when it is printed out the user wants each different group to be on a seperate page, any idea on how to do it
thanks for any help

Dave
 
hi skipvought,
the code I am using is

Selection.Subtotal GroupBy:=1, Function:=xlSum, _
TotalList:=(6)

is there another way to include page breaks too? Can you use the wizard by writing vb code to execute it?
 
Hi
You need to add this parameter to your subtotal code
Code:
PageBreaks:=True

Happy Friday
;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
 
Dave,
My point was that you DON'T need to code what you want to do, unless you have a buring desire to maintain something that otherwise does not need to be maintained (which 99.9% of user code does).

The Subtotal Wizard DOES what you seem to want to do! So why write code, unless its an academic exersize.

:)

Skip,
Skip@TheOfficeExperts.com
 
hi skipvought, the actual macro isn't for me instead its for 25 users who don't want to know the ins and outs of excel. So to make it easy for them i'm writing macros to format loads of different workbooks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top