View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Collapsing Grouped rows by Macro

Turn on the macro recorder and then manually collapse the rows.

Now expand them.

Turn off the macro recorder. Look at the recorded code. It should give you
some insight into what you need to do.


--
Regards,
Tom Ogilvy


"Philip J Smith" wrote:

I have a report which contains some grouped rows.
In each case the rows are grouped into a total above.
The working status of the groups should be all rows desplayed.
Before printing I would like to collapse some of the groups so that only the
totals are shown.

I have tried.

Range("NewPLTradeIncome").OutlineLevel = 1

This fails:

I get the error report

"Unable to set the OutlineLevel property of the range class"

Can anyone point me in the right direction please?