Expand and Collapse groups


D

DG

I have a range of rows (10 - 15) that are grouped.

Thus

Rows("10:15").Select

How do I collapse and expand the group in vba?

I tried to record the macro while I clicked the + and - signs but it
recorded nothing.

DG
 
Ad

Advertisements

M

minimaster

try

Rows("10:15").Group ' for the grouping

ActiveSheet.Outline.ShowLevels RowLevels:=1 ' to collapse the grouped
rows

r. minimaster
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top