outline question

K

Kent McPherson

I have a worksheet with two sections that both have outlines defined. I'd
like to be able to set the top section to level 3 and the bottom section to
level 2. I've set the entire sheet to level 3 and then tried this code but
it doesn't work. I get a run time error because the selection is not an
outline object. Is there a way to set the levels of two different sections
to different levels?

'
' Show only 2 levels
'
Range("A" & start_trn_row).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
With Selection

.Outline.ShowLevels RowLevels:=2

End With
 
P

Paul C

Start by grouping each section individually to level 2. Then select the
entire selection you want to group as level 3 and group it again. This will
change the selection to a level 3 group.
 

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