Opening/Closing a lot of groupings via VBA
You're hiding all or showing all???
If yes, then how about just doing it twice:
ActiveSheet.Outline.ShowLevels 1
and later:
ActiveSheet.Outline.ShowLevels 8
If you wanted to just see some of the outline, I can see why you'd want to
loop--but not all or one.
Dirk Flakowski wrote:
Hello,
I have a workbook with about 10.000 rows with about 300 vertical
groupings in it. In my program I have to close/open all the groupings
from time to time via VBA.
So I loop through all rows (1 to 10.000) and set the
"ShowDetail"-property of all rows to TRUE/FALSE - ignoring the errors
occuring for rows having no grouping.
But this takes about 20s what is quite too long for the user to wait
for. So does anybody have any idea how I could speed up
opening/closing all groupings?
I also have used "ActiveSheet.Outline.Showlevels" - but that is nearly
the same (due to performance) and has some other problems (e.g. on
closing I have to call it 8 times - once with "RowLevels:=8, once with
:=7... :=1).
So if you have any suggestion the please let me know.
Thanks in advance.
Dirk
--
Dave Peterson
|