ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ClearOutLine Method (https://www.excelbanter.com/excel-programming/288531-clearoutline-method.html)

jacqui[_2_]

ClearOutLine Method
 
I've used the Subtotal method to generate totals in my
datafile, however when I use the Selection.ClearOutLine
syntax, VBA removes the expansion/contraction lines with
the little minus/plus buttons but it doesn't remove the
ShowLevel buttons. When I do this manually in Excel ie
Data, Group and Outline then Clear Outline it does.
Can anyone provide the correct code to remove both the
lines and showlevel buttons.

Many thanks
Jacqui

Dave Peterson[_3_]

ClearOutLine Method
 
When I did it with the whole subtotal range selected, everything got cleared.

But when I had a subset of the subtotaled range selected, I got what you
describe.

Maybe just selecting the right range (or all of the worksheet???) would do it
for you.

cells.ClearOutLine

jacqui wrote:

I've used the Subtotal method to generate totals in my
datafile, however when I use the Selection.ClearOutLine
syntax, VBA removes the expansion/contraction lines with
the little minus/plus buttons but it doesn't remove the
ShowLevel buttons. When I do this manually in Excel ie
Data, Group and Outline then Clear Outline it does.
Can anyone provide the correct code to remove both the
lines and showlevel buttons.

Many thanks
Jacqui


--

Dave Peterson



All times are GMT +1. The time now is 06:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com