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
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