I think you'd be better off looping through all the commandbars - the time taken should be negligible (hundredths of a second). In my setup there are more visible controls than there are commandbars, so it should be quicker to iterate the bars.
I think you'd be better off looping through all the commandbars - the time taken should be negligible (hundredths of a second). In my setup there are more visible controls than there are commandbars, so it should be quicker to iterate the bars.
Everyone who confuses correlation and causation ends up dead.
Hi Romper;
Actually CommandBars.FindControls(Visible:=True) does produce a collection of Controls that are visible and only those on visible CommandBars and it doesn't drill down through the Controls for sub Controls, so I think that will be quicker. There are 118 CommandBars, but I never have that many Controls visible at one time.
I can loop through all the visible Controls extracting the CommandBars, and hide those CommandBars that are not on my list of CommandBars, then loop through my list making all of them visible.
Do you see anything wrong with that idea?
Last edited by foxguy; 06-06-2011 at 03:35 AM.
No, if it's that way round for you then fine. (I know what FindControls does.)
For me, I have about 30 more visible controls than there are commandbars, so it would be slower I suspect. Either way I doubt there's a noticeable difference.
Hi Romper;
I'm curious. How do you work with over 140 visible controls? And don't they take up a lot of real estate on your screen?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks