I have some code that shows data to a certain level in an Excel sheet…
ExcelObject .ActiveSheet.Outline.ShowLevels RowLevels:=4
4 used to be the second to last level of detail, 5 would display everything in the report. However, the report being produced is now changing regularly & 4 is not always the correct level to display.
What I need to do is determine the second to last level of detail in the report & ShowLevels to this …. eg;
Dim iLevels as Integer
iLevels = ExcelObject.ActiveSheet.Outline.{GetLevels}
ExcelObject .ActiveSheet.Outline.ShowLevels RowLevels:=iLevels
Is there anything like this, or am I in dreamworld here….?!
Thanks