+ Reply to Thread
Results 1 to 9 of 9

show specific commandbars

Hybrid View

  1. #1
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,007

    Re: show specific commandbars

    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.

  2. #2
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: show specific commandbars

    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.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,007

    Re: show specific commandbars

    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.

  4. #4
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: show specific commandbars

    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?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1