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 Excel VBA Expand/Collapse with Subtotals

Worksheets("Sheet1").Outline _
.ShowLevels rowLevels:=3, columnLevels:=1

or

Worksheets("Sheet1").Rows(2).OutlineLevel = 1


See help on these methods for details.

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
I am using Excel 2000 with Microsoft Windows 2000.

I created a spreadsheet with double subtotals on each of the three
tabs.
I know that when I click on the plus signs off to the left, it
collapses the subtotals
so I can see the detail.

How do I do this in code?

I just want to collapse specific numbers in my subtotals.

I have to do this many times each day manually, so the code will be a
big help!