ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Determine the number of outline levels using vba (https://www.excelbanter.com/excel-programming/375133-determine-number-outline-levels-using-vba.html)

Jamie Richards

Determine the number of outline levels using vba
 
Hi Folks,

Does anyone know if it possible to count the number of levels in an Excel
worksheet outline using code? For example in the same way you may count rows
using "ActiveSheet.UsedRange.Rows.Count".

I want to use this feature to assist with showing and hiding grouped rows in
a protected worksheet.

TIA!

Jamie

Tom Ogilvy

Determine the number of outline levels using vba
 
Think you have to loop through the rows and check the outlinelevel property.
Find the largest one.


--
Regards,
Tom Ogilvy


"Jamie Richards" wrote in message
...
Hi Folks,

Does anyone know if it possible to count the number of levels in an Excel
worksheet outline using code? For example in the same way you may count
rows
using "ActiveSheet.UsedRange.Rows.Count".

I want to use this feature to assist with showing and hiding grouped rows
in
a protected worksheet.

TIA!

Jamie





All times are GMT +1. The time now is 08:34 AM.

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